diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f16892e6cd4..695332f5dda 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -37,6 +37,8 @@ "packages/google-cloud-contactcenterinsights": "2.4.1", "packages/google-cloud-contentwarehouse": "0.4.0", "packages/google-cloud-datacatalog": "3.2.1", + "packages/google-cloud-datacatalog-lineage": "0.1.1", + "packages/google-cloud-dataform": "0.4.0", "packages/google-cloud-datafusion": "2.2.1", "packages/google-cloud-datalabeling": "3.2.1", "packages/google-cloud-dataplex": "2.3.1", @@ -59,6 +61,7 @@ "packages/google-cloud-gkeconnect-gateway": "2.1.1", "packages/google-cloud-gkehub": "3.3.1", "packages/google-cloud-gkemulticloud": "0.3.1", + "packages/google-cloud-gsuiteaddons": "0.1.1", "packages/google-cloud-iap": "2.2.1", "packages/google-cloud-ids": "2.2.1", "packages/google-cloud-iot": "3.2.1", @@ -122,13 +125,11 @@ "packages/google-iam-credentials": "2.0.3", "packages/google-identity-accesscontextmanager": "2.3.1", "packages/google-maps-addressvalidation": "1.0.1", + "packages/google-maps-mapsplatformdatasets": "0.1.1", "packages/google-maps-routing": "0.3.1", "packages/google-monitoring-dashboard": "2.9.1", "packages/google-privacy-dlp": "4.4.1", "packages/google-storagetransfer": "2.3.1", "packages/grafeas": "4.2.2", - "packages/typeless-sample-bot": "1.3.0", - "packages/google-cloud-datacatalog-lineage": "0.1.1", - "packages/google-maps-mapsplatformdatasets": "0.1.1", - "packages/google-cloud-gsuiteaddons": "0.1.1" + "packages/typeless-sample-bot": "1.3.0" } diff --git a/packages/google-cloud-dataform/.OwlBot.yaml b/packages/google-cloud-dataform/.OwlBot.yaml new file mode 100644 index 00000000000..dc941a81d74 --- /dev/null +++ b/packages/google-cloud-dataform/.OwlBot.yaml @@ -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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/dataform/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-dataform/$1 diff --git a/packages/google-cloud-dataform/.eslintignore b/packages/google-cloud-dataform/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-cloud-dataform/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-dataform/.eslintrc.json b/packages/google-cloud-dataform/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-dataform/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-dataform/.gitattributes b/packages/google-cloud-dataform/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-dataform/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-dataform/.gitignore b/packages/google-cloud-dataform/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/packages/google-cloud-dataform/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-cloud-dataform/.jsdoc.js b/packages/google-cloud-dataform/.jsdoc.js new file mode 100644 index 00000000000..fd3c4b2640a --- /dev/null +++ b/packages/google-cloud-dataform/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2023 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/dataform', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-dataform/.mocharc.js b/packages/google-cloud-dataform/.mocharc.js new file mode 100644 index 00000000000..49e7e228701 --- /dev/null +++ b/packages/google-cloud-dataform/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-dataform/.nycrc b/packages/google-cloud-dataform/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-dataform/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-dataform/.prettierignore b/packages/google-cloud-dataform/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-dataform/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-dataform/.prettierrc.js b/packages/google-cloud-dataform/.prettierrc.js new file mode 100644 index 00000000000..1e6cec783e4 --- /dev/null +++ b/packages/google-cloud-dataform/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-dataform/.repo-metadata.json b/packages/google-cloud-dataform/.repo-metadata.json new file mode 100644 index 00000000000..386816ec8fe --- /dev/null +++ b/packages/google-cloud-dataform/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "dataform", + "name_pretty": "Dataform API", + "product_documentation": "https://dataform.co/", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/dataform/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/dataform", + "api_id": "dataform.googleapis.com", + "default_version": "v1beta1", + "requires_billing": true, + "library_type": "GAPIC_AUTO" +} diff --git a/packages/google-cloud-dataform/CHANGELOG.md b/packages/google-cloud-dataform/CHANGELOG.md new file mode 100644 index 00000000000..3736db89f3f --- /dev/null +++ b/packages/google-cloud-dataform/CHANGELOG.md @@ -0,0 +1,52 @@ +# Changelog + +## [0.4.0](https://github.com/googleapis/nodejs-dataform/compare/v0.3.0...v0.4.0) (2023-02-22) + + +### ⚠ BREAKING CHANGES + +* change default version to v1beta1 + +### Features + +* Change default version to v1beta1 ([34c9527](https://github.com/googleapis/nodejs-dataform/commit/34c9527e36d1e148480f33942a5d7745e320ecca)) + +## [0.3.0](https://github.com/googleapis/nodejs-dataform/compare/v0.2.0...v0.3.0) (2023-02-09) + + +### Features + +* Added Snooze API support ([a261ce7](https://github.com/googleapis/nodejs-dataform/commit/a261ce7bd7138b8b236699e63f5c6030ea3803f0)) + + +### Bug Fixes + +* **deps:** Use google-gax v3.5.2 ([#25](https://github.com/googleapis/nodejs-dataform/issues/25)) ([9df841b](https://github.com/googleapis/nodejs-dataform/commit/9df841b7a8e573e777428e649f60de2076ada2c1)) +* Regenerated protos JS and TS definitions ([#29](https://github.com/googleapis/nodejs-dataform/issues/29)) ([cf713a7](https://github.com/googleapis/nodejs-dataform/commit/cf713a7d8b50323b33efbb0793fbe39c4faf5b89)) + +## [0.2.0](https://github.com/googleapis/nodejs-dataform/compare/v0.1.0...v0.2.0) (2022-09-14) + + +### Features + +* Release API version v1beta1 (no changes to v1alpha2) ([#11](https://github.com/googleapis/nodejs-dataform/issues/11)) ([1ff35a6](https://github.com/googleapis/nodejs-dataform/commit/1ff35a6b63f9d64ea5f7d78a0022c1fab9c95411)) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#18](https://github.com/googleapis/nodejs-dataform/issues/18)) ([34e62f5](https://github.com/googleapis/nodejs-dataform/commit/34e62f559325cf314e6c017da5f46b845a49ecef)) +* Better support for fallback mode ([#13](https://github.com/googleapis/nodejs-dataform/issues/13)) ([f48d918](https://github.com/googleapis/nodejs-dataform/commit/f48d918863db5b1aeff084b562b087ce9b92e8ea)) +* Change import long to require ([#14](https://github.com/googleapis/nodejs-dataform/issues/14)) ([3790bfd](https://github.com/googleapis/nodejs-dataform/commit/3790bfd0881957c089e22e372af19e172ade31eb)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-dataform/issues/1553)) ([#17](https://github.com/googleapis/nodejs-dataform/issues/17)) ([32373fd](https://github.com/googleapis/nodejs-dataform/commit/32373fd2c5b85df5517821d7105635bc3f7ec723)) +* Preserve default values in x-goog-request-params header ([#19](https://github.com/googleapis/nodejs-dataform/issues/19)) ([bbb3790](https://github.com/googleapis/nodejs-dataform/commit/bbb379042b001ed4fcc49423cfcee126dcff9270)) +* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-dataform/issues/1546)) ([#15](https://github.com/googleapis/nodejs-dataform/issues/15)) ([71f0add](https://github.com/googleapis/nodejs-dataform/commit/71f0add64a43424ee71c0bbe03f82bf78d98eb3c)) +* use google-gax v3.3.0 ([32373fd](https://github.com/googleapis/nodejs-dataform/commit/32373fd2c5b85df5517821d7105635bc3f7ec723)) + +## 0.1.0 (2022-07-22) + + +### Features + +* add initial samples and tests ([fee86a3](https://github.com/googleapis/nodejs-dataform/commit/fee86a37ea438da3285823db24ae52ddfbc4cca0)) +* add templated files from docker image ([3142f78](https://github.com/googleapis/nodejs-dataform/commit/3142f780f4ce5403208ef2c8d248f5c62a05507c)) +* initial stub of library ([5a68c4b](https://github.com/googleapis/nodejs-dataform/commit/5a68c4b37a9050d395b946cee40cb4ca255dd16c)) diff --git a/packages/google-cloud-dataform/CODE_OF_CONDUCT.md b/packages/google-cloud-dataform/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-dataform/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-dataform/CONTRIBUTING.md b/packages/google-cloud-dataform/CONTRIBUTING.md new file mode 100644 index 00000000000..98e3fe6ba4f --- /dev/null +++ b/packages/google-cloud-dataform/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 Dataform API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=dataform.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-dataform/LICENSE b/packages/google-cloud-dataform/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-dataform/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/google-cloud-dataform/README.md b/packages/google-cloud-dataform/README.md new file mode 100644 index 00000000000..871cc4a77f0 --- /dev/null +++ b/packages/google-cloud-dataform/README.md @@ -0,0 +1,207 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Dataform API: Node.js Client](https://github.com/googleapis/google-cloud-node) + +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/dataform.svg)](https://www.npmjs.org/package/@google-cloud/dataform) + + + + +dataform client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataform/CHANGELOG.md). + +* [Dataform API Node.js Client API Reference][client-docs] +* [Dataform API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-cloud-dataform](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataform) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[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) + +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Dataform API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/dataform +``` + + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Dataform.cancel_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js,samples/README.md) | +| Dataform.commit_workspace_changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js,samples/README.md) | +| Dataform.create_compilation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js,samples/README.md) | +| Dataform.create_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js,samples/README.md) | +| Dataform.create_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js,samples/README.md) | +| Dataform.create_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js,samples/README.md) | +| Dataform.delete_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js,samples/README.md) | +| Dataform.delete_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js,samples/README.md) | +| Dataform.delete_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js,samples/README.md) | +| Dataform.fetch_file_diff | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js,samples/README.md) | +| Dataform.fetch_file_git_statuses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js,samples/README.md) | +| Dataform.fetch_git_ahead_behind | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js,samples/README.md) | +| Dataform.fetch_remote_branches | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js,samples/README.md) | +| Dataform.get_compilation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js,samples/README.md) | +| Dataform.get_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js,samples/README.md) | +| Dataform.get_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js,samples/README.md) | +| Dataform.get_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js,samples/README.md) | +| Dataform.install_npm_packages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js,samples/README.md) | +| Dataform.list_compilation_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js,samples/README.md) | +| Dataform.list_repositories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js,samples/README.md) | +| Dataform.list_workflow_invocations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js,samples/README.md) | +| Dataform.list_workspaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js,samples/README.md) | +| Dataform.make_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js,samples/README.md) | +| Dataform.move_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js,samples/README.md) | +| Dataform.move_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js,samples/README.md) | +| Dataform.pull_git_commits | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js,samples/README.md) | +| Dataform.push_git_commits | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js,samples/README.md) | +| Dataform.query_compilation_result_actions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js,samples/README.md) | +| Dataform.query_directory_contents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js,samples/README.md) | +| Dataform.query_workflow_invocation_actions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js,samples/README.md) | +| Dataform.read_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js,samples/README.md) | +| Dataform.remove_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js,samples/README.md) | +| Dataform.remove_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js,samples/README.md) | +| Dataform.reset_workspace_changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js,samples/README.md) | +| Dataform.update_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js,samples/README.md) | +| Dataform.write_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js,samples/README.md) | +| Dataform.cancel_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js,samples/README.md) | +| Dataform.commit_workspace_changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js,samples/README.md) | +| Dataform.create_compilation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js,samples/README.md) | +| Dataform.create_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js,samples/README.md) | +| Dataform.create_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js,samples/README.md) | +| Dataform.create_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js,samples/README.md) | +| Dataform.delete_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js,samples/README.md) | +| Dataform.delete_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js,samples/README.md) | +| Dataform.delete_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js,samples/README.md) | +| Dataform.fetch_file_diff | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js,samples/README.md) | +| Dataform.fetch_file_git_statuses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js,samples/README.md) | +| Dataform.fetch_git_ahead_behind | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js,samples/README.md) | +| Dataform.fetch_remote_branches | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js,samples/README.md) | +| Dataform.get_compilation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js,samples/README.md) | +| Dataform.get_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js,samples/README.md) | +| Dataform.get_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js,samples/README.md) | +| Dataform.get_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js,samples/README.md) | +| Dataform.install_npm_packages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js,samples/README.md) | +| Dataform.list_compilation_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js,samples/README.md) | +| Dataform.list_repositories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js,samples/README.md) | +| Dataform.list_workflow_invocations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js,samples/README.md) | +| Dataform.list_workspaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js,samples/README.md) | +| Dataform.make_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js,samples/README.md) | +| Dataform.move_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js,samples/README.md) | +| Dataform.move_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js,samples/README.md) | +| Dataform.pull_git_commits | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js,samples/README.md) | +| Dataform.push_git_commits | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js,samples/README.md) | +| Dataform.query_compilation_result_actions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js,samples/README.md) | +| Dataform.query_directory_contents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js,samples/README.md) | +| Dataform.query_workflow_invocation_actions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js,samples/README.md) | +| Dataform.read_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js,samples/README.md) | +| Dataform.remove_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js,samples/README.md) | +| Dataform.remove_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js,samples/README.md) | +| Dataform.reset_workspace_changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js,samples/README.md) | +| Dataform.update_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js,samples/README.md) | +| Dataform.write_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/test/quickstart.js,samples/README.md) | + + + +The [Dataform API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/dataform@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/dataform/latest +[product-docs]: https://dataform.co/ +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=dataform.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-dataform/linkinator.config.json b/packages/google-cloud-dataform/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-cloud-dataform/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json new file mode 100644 index 00000000000..b818983d26f --- /dev/null +++ b/packages/google-cloud-dataform/package.json @@ -0,0 +1,71 @@ +{ + "name": "@google-cloud/dataform", + "version": "0.4.0", + "description": "dataform client for Node.js", + "repository": { + "type": "git", + "directory": "packages/google-cloud-dataform", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google dataform", + "dataform", + "dataform service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "npm run compile && c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^3.5.2" + }, + "devDependencies": { + "@types/mocha": "^10.0.0", + "@types/node": "^18.0.0", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^2.0.0", + "jsdoc-region-tag": "^2.0.0", + "linkinator": "^4.0.0", + "mocha": "^10.0.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^15.0.0", + "ts-loader": "^9.1.2", + "typescript": "^4.2.4", + "webpack": "^5.36.2", + "webpack-cli": "^5.0.0" + }, + "engines": { + "node": ">=v12.0.0" + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataform" +} diff --git a/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto new file mode 100644 index 00000000000..6547cba48b3 --- /dev/null +++ b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto @@ -0,0 +1,1628 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataform.v1alpha2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/type/interval.proto"; + +option csharp_namespace = "Google.Cloud.Dataform.V1Alpha2"; +option go_package = "cloud.google.com/go/dataform/apiv1alpha2/dataformpb;dataformpb"; +option java_multiple_files = true; +option java_outer_classname = "DataformProto"; +option java_package = "com.google.cloud.dataform.v1alpha2"; +option php_namespace = "Google\\Cloud\\Dataform\\V1alpha2"; +option ruby_package = "Google::Cloud::Dataform::V1alpha2"; +option (google.api.resource_definition) = { + type: "secretmanager.googleapis.com/SecretVersion" + pattern: "projects/{project}/secrets/{secret}/versions/{version}" +}; + +// Dataform is a service to develop, create, document, test, and update curated +// tables in BigQuery. +service Dataform { + option (google.api.default_host) = "dataform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Repositories in a given project and location. + rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/locations/*}/repositories" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single Repository. + rpc GetRepository(GetRepositoryRequest) returns (Repository) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Repository in a given project and location. + rpc CreateRepository(CreateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/locations/*}/repositories" + body: "repository" + }; + option (google.api.method_signature) = "parent,repository,repository_id"; + } + + // Updates a single Repository. + rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + patch: "/v1alpha2/{repository.name=projects/*/locations/*/repositories/*}" + body: "repository" + }; + option (google.api.method_signature) = "repository,update_mask"; + } + + // Deletes a single Repository. + rpc DeleteRepository(DeleteRepositoryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha2/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Fetches a Repository's remote branches. + rpc FetchRemoteBranches(FetchRemoteBranchesRequest) returns (FetchRemoteBranchesResponse) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + }; + } + + // Lists Workspaces in a given Repository. + rpc ListWorkspaces(ListWorkspacesRequest) returns (ListWorkspacesResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workspaces" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single Workspace. + rpc GetWorkspace(GetWorkspaceRequest) returns (Workspace) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Workspace in a given Repository. + rpc CreateWorkspace(CreateWorkspaceRequest) returns (Workspace) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workspaces" + body: "workspace" + }; + option (google.api.method_signature) = "parent,workspace,workspace_id"; + } + + // Deletes a single Workspace. + rpc DeleteWorkspace(DeleteWorkspaceRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Installs dependency NPM packages (inside a Workspace). + rpc InstallNpmPackages(InstallNpmPackagesRequest) returns (InstallNpmPackagesResponse) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages" + body: "*" + }; + } + + // Pulls Git commits from the Repository's remote into a Workspace. + rpc PullGitCommits(PullGitCommitsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull" + body: "*" + }; + } + + // Pushes Git commits from a Workspace to the Repository's remote. + rpc PushGitCommits(PushGitCommitsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:push" + body: "*" + }; + } + + // Fetches Git statuses for the files in a Workspace. + rpc FetchFileGitStatuses(FetchFileGitStatusesRequest) returns (FetchFileGitStatusesResponse) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + }; + } + + // Fetches Git ahead/behind against a remote branch. + rpc FetchGitAheadBehind(FetchGitAheadBehindRequest) returns (FetchGitAheadBehindResponse) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + }; + } + + // Applies a Git commit for uncommitted files in a Workspace. + rpc CommitWorkspaceChanges(CommitWorkspaceChangesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit" + body: "*" + }; + } + + // Performs a Git reset for uncommitted files in a Workspace. + rpc ResetWorkspaceChanges(ResetWorkspaceChangesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset" + body: "*" + }; + } + + // Fetches Git diff for an uncommitted file in a Workspace. + rpc FetchFileDiff(FetchFileDiffRequest) returns (FetchFileDiffResponse) { + option (google.api.http) = { + get: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + }; + } + + // Returns the contents of a given Workspace directory. + rpc QueryDirectoryContents(QueryDirectoryContentsRequest) returns (QueryDirectoryContentsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + }; + } + + // Creates a directory inside a Workspace. + rpc MakeDirectory(MakeDirectoryRequest) returns (MakeDirectoryResponse) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory" + body: "*" + }; + } + + // Deletes a directory (inside a Workspace) and all of its contents. + rpc RemoveDirectory(RemoveDirectoryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory" + body: "*" + }; + } + + // Moves a directory (inside a Workspace), and all of its contents, to a new + // location. + rpc MoveDirectory(MoveDirectoryRequest) returns (MoveDirectoryResponse) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory" + body: "*" + }; + } + + // Returns the contents of a file (inside a Workspace). + rpc ReadFile(ReadFileRequest) returns (ReadFileResponse) { + option (google.api.http) = { + get: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + }; + } + + // Deletes a file (inside a Workspace). + rpc RemoveFile(RemoveFileRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile" + body: "*" + }; + } + + // Moves a file (inside a Workspace) to a new location. + rpc MoveFile(MoveFileRequest) returns (MoveFileResponse) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile" + body: "*" + }; + } + + // Writes to a file (inside a Workspace). + rpc WriteFile(WriteFileRequest) returns (WriteFileResponse) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile" + body: "*" + }; + } + + // Lists CompilationResults in a given Repository. + rpc ListCompilationResults(ListCompilationResultsRequest) returns (ListCompilationResultsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/compilationResults" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single CompilationResult. + rpc GetCompilationResult(GetCompilationResultRequest) returns (CompilationResult) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/compilationResults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new CompilationResult in a given project and location. + rpc CreateCompilationResult(CreateCompilationResultRequest) returns (CompilationResult) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/compilationResults" + body: "compilation_result" + }; + option (google.api.method_signature) = "parent,compilation_result"; + } + + // Returns CompilationResultActions in a given CompilationResult. + rpc QueryCompilationResultActions(QueryCompilationResultActionsRequest) returns (QueryCompilationResultActionsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + }; + } + + // Lists WorkflowInvocations in a given Repository. + rpc ListWorkflowInvocations(ListWorkflowInvocationsRequest) returns (ListWorkflowInvocationsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single WorkflowInvocation. + rpc GetWorkflowInvocation(GetWorkflowInvocationRequest) returns (WorkflowInvocation) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new WorkflowInvocation in a given Repository. + rpc CreateWorkflowInvocation(CreateWorkflowInvocationRequest) returns (WorkflowInvocation) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + body: "workflow_invocation" + }; + option (google.api.method_signature) = "parent,workflow_invocation"; + } + + // Deletes a single WorkflowInvocation. + rpc DeleteWorkflowInvocation(DeleteWorkflowInvocationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Requests cancellation of a running WorkflowInvocation. + rpc CancelWorkflowInvocation(CancelWorkflowInvocationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel" + body: "*" + }; + } + + // Returns WorkflowInvocationActions in a given WorkflowInvocation. + rpc QueryWorkflowInvocationActions(QueryWorkflowInvocationActionsRequest) returns (QueryWorkflowInvocationActionsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + }; + } +} + +// Represents a Dataform Git repository. +message Repository { + option (google.api.resource) = { + type: "dataform.googleapis.com/Repository" + pattern: "projects/{project}/locations/{location}/repositories/{repository}" + }; + + // Controls Git remote configuration for a repository. + message GitRemoteSettings { + // Indicates the status of a Git authentication token. + enum TokenStatus { + // Default value. This value is unused. + TOKEN_STATUS_UNSPECIFIED = 0; + + // The token could not be found in Secret Manager (or the Dataform + // Service Account did not have permission to access it). + NOT_FOUND = 1; + + // The token could not be used to authenticate against the Git remote. + INVALID = 2; + + // The token was used successfully to authenticate against the Git remote. + VALID = 3; + } + + // Required. The Git remote's URL. + string url = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Git remote's default branch name. + string default_branch = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the Secret Manager secret version to use as an + // authentication token for Git operations. Must be in the format + // `projects/*/secrets/*/versions/*`. + string authentication_token_secret_version = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Output only. Indicates the status of the Git access token. + TokenStatus token_status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The repository's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. If set, configures this repository to be linked to a Git remote. + GitRemoteSettings git_remote_settings = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListRepositories` request message. +message ListRepositoriesRequest { + // Required. The location in which to list repositories. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of repositories to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListRepositories` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListRepositories` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field only supports ordering by `name`. If unspecified, the server + // will choose the ordering. If specified, the default order is ascending for + // the `name` field. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the returned list. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListRepositories` response message. +message ListRepositoriesResponse { + // List of repositories. + repeated Repository repositories = 1; + + // A token which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetRepository` request message. +message GetRepositoryRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; +} + +// `CreateRepository` request message. +message CreateRepositoryRequest { + // Required. The location in which to create the repository. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The repository to create. + Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the repository, which will become the final component of + // the repository's resource name. + string repository_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `UpdateRepository` request message. +message UpdateRepositoryRequest { + // Optional. Specifies the fields to be updated in the repository. If left unset, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The repository to update. + Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteRepository` request message. +message DeleteRepositoryRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // If set to true, any child resources of this repository will also be + // deleted. (Otherwise, the request will only succeed if the repository has no + // child resources.) + bool force = 2; +} + +// `FetchRemoteBranches` request message. +message FetchRemoteBranchesRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; +} + +// `FetchRemoteBranches` response message. +message FetchRemoteBranchesResponse { + // The remote repository's branch names. + repeated string branches = 1; +} + +// Represents a Dataform Git workspace. +message Workspace { + option (google.api.resource) = { + type: "dataform.googleapis.com/Workspace" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}" + }; + + // Output only. The workspace's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListWorkspaces` request message. +message ListWorkspacesRequest { + // Required. The repository in which to list workspaces. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of workspaces to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListWorkspaces` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkspaces` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field only supports ordering by `name`. If unspecified, the server + // will choose the ordering. If specified, the default order is ascending for + // the `name` field. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the returned list. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListWorkspaces` response message. +message ListWorkspacesResponse { + // List of workspaces. + repeated Workspace workspaces = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetWorkspace` request message. +message GetWorkspaceRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `CreateWorkspace` request message. +message CreateWorkspaceRequest { + // Required. The repository in which to create the workspace. Must be in the format + // `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The workspace to create. + Workspace workspace = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the workspace, which will become the final component of + // the workspace's resource name. + string workspace_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteWorkspace` request message. +message DeleteWorkspaceRequest { + // Required. The workspace resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// Represents the author of a Git commit. +message CommitAuthor { + // Required. The commit author's name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The commit author's email address. + string email_address = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `PullGitCommits` request message. +message PullGitCommitsRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote from which to pull commits. + // If left unset, the repository's default branch name will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The author of any merge commit which may be created as a result of merging + // fetched Git commits into this workspace. + CommitAuthor author = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `PushGitCommits` request message. +message PushGitCommitsRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote to which commits should be pushed. + // If left unset, the repository's default branch name will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchFileGitStatuses` request message. +message FetchFileGitStatusesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `FetchFileGitStatuses` response message. +message FetchFileGitStatusesResponse { + // Represents the Git state of a file with uncommitted changes. + message UncommittedFileChange { + // Indicates the status of an uncommitted file change. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The file has been newly added. + ADDED = 1; + + // The file has been deleted. + DELETED = 2; + + // The file has been modified. + MODIFIED = 3; + + // The file contains merge conflicts. + HAS_CONFLICTS = 4; + } + + // The file's full path including filename, relative to the workspace root. + string path = 1; + + // Indicates the status of the file. + State state = 2; + } + + // A list of all files which have uncommitted Git changes. There will only be + // a single entry for any given file. + repeated UncommittedFileChange uncommitted_file_changes = 1; +} + +// `FetchGitAheadBehind` request message. +message FetchGitAheadBehindRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote against which this workspace + // should be compared. If left unset, the repository's default branch name + // will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchGitAheadBehind` response message. +message FetchGitAheadBehindResponse { + // The number of commits in the remote branch that are not in the workspace. + int32 commits_ahead = 1; + + // The number of commits in the workspace that are not in the remote branch. + int32 commits_behind = 2; +} + +// `CommitWorkspaceChanges` request message. +message CommitWorkspaceChangesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The commit's author. + CommitAuthor author = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The commit's message. + string commit_message = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Full file paths to commit including filename, rooted at workspace root. If + // left empty, all files will be committed. + repeated string paths = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ResetWorkspaceChanges` request message. +message ResetWorkspaceChangesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. Full file paths to reset back to their committed state including filename, + // rooted at workspace root. If left empty, all files will be reset. + repeated string paths = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, untracked files will be deleted. + bool clean = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchFileDiff` request message. +message FetchFileDiffRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `FetchFileDiff` response message. +message FetchFileDiffResponse { + // The raw formatted Git diff for the file. + string formatted_diff = 1; +} + +// `QueryDirectoryContents` request message. +message QueryDirectoryContentsRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The directory's full path including directory name, relative to the + // workspace root. If left unset, the workspace root is used. + string path = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of paths to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryDirectoryContents` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryDirectoryContents` must match the call that provided the page + // token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryDirectoryContents` response message. +message QueryDirectoryContentsResponse { + // Represents a single entry in a workspace directory. + message DirectoryEntry { + oneof entry { + // A file in the directory. + string file = 1; + + // A child directory in the directory. + string directory = 2; + } + } + + // List of entries in the directory. + repeated DirectoryEntry directory_entries = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// `MakeDirectory` request message. +message MakeDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MakeDirectory` response message. +message MakeDirectoryResponse { + +} + +// `RemoveDirectory` request message. +message RemoveDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveDirectory` request message. +message MoveDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new path for the directory including directory name, rooted at + // workspace root. + string new_path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveDirectory` response message. +message MoveDirectoryResponse { + +} + +// `ReadFile` request message. +message ReadFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `ReadFile` response message. +message ReadFileResponse { + // The file's contents. + bytes file_contents = 1; +} + +// `RemoveFile` request message. +message RemoveFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveFile` request message. +message MoveFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The file's new path including filename, relative to the workspace root. + string new_path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveFile` response message. +message MoveFileResponse { + +} + +// `WriteFile` request message. +message WriteFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The file's contents. + bytes contents = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `WriteFile` response message. +message WriteFileResponse { + +} + +// `InstallNpmPackages` request message. +message InstallNpmPackagesRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `InstallNpmPackages` response message. +message InstallNpmPackagesResponse { + +} + +// Represents the result of compiling a Dataform project. +message CompilationResult { + option (google.api.resource) = { + type: "dataform.googleapis.com/CompilationResult" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}" + }; + + // Configures various aspects of Dataform code compilation. + message CodeCompilationConfig { + // Optional. The default database (Google Cloud project ID). + string default_database = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default schema (BigQuery dataset ID). + string default_schema = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default BigQuery location to use. Defaults to "US". + // See the BigQuery docs for a full list of locations: + // https://cloud.google.com/bigquery/docs/locations. + string default_location = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default schema (BigQuery dataset ID) for assertions. + string assertion_schema = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined variables that are made available to project code during + // compilation. + map vars = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all database (Google Cloud project + // ID) names. + string database_suffix = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all schema (BigQuery dataset ID) + // names. + string schema_suffix = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The prefix that should be prepended to all table names. + string table_prefix = 7 [(google.api.field_behavior) = OPTIONAL]; + } + + // An error encountered when attempting to compile a Dataform project. + message CompilationError { + // Output only. The error's top level message. + string message = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The error's full stack trace. + string stack = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The path of the file where this error occurred, if available, relative to + // the project root. + string path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The identifier of the action where this error occurred, if available. + Target action_target = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The compilation result's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + oneof source { + // Immutable. Git commit/tag/branch name at which the repository should be compiled. + // Must exist in the remote repository. + // Examples: + // - a commit SHA: `12ade345` + // - a tag: `tag1` + // - a branch name: `branch1` + string git_commitish = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The name of the workspace to compile. Must be in the format + // `projects/*/locations/*/repositories/*/workspaces/*`. + string workspace = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + } + + // Immutable. If set, fields of `code_compilation_overrides` override the default + // compilation settings that are specified in dataform.json. + CodeCompilationConfig code_compilation_config = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The version of `@dataform/core` that was used for compilation. + string dataform_core_version = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Errors encountered during project compilation. + repeated CompilationError compilation_errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListCompilationResults` request message. +message ListCompilationResultsRequest { + // Required. The repository in which to list compilation results. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of compilation results to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListCompilationResults` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCompilationResults` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListCompilationResults` response message. +message ListCompilationResultsResponse { + // List of compilation results. + repeated CompilationResult compilation_results = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetCompilationResult` request message. +message GetCompilationResultRequest { + // Required. The compilation result's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; +} + +// `CreateCompilationResult` request message. +message CreateCompilationResultRequest { + // Required. The repository in which to create the compilation result. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The compilation result to create. + CompilationResult compilation_result = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents an action identifier. If the action writes output, the output +// will be written to the referenced database object. +message Target { + // The action's database (Google Cloud project ID) . + string database = 1; + + // The action's schema (BigQuery dataset ID), within `database`. + string schema = 2; + + // The action's name, within `database` and `schema`. + string name = 3; +} + +// Describes a relation and its columns. +message RelationDescriptor { + // Describes a column. + message ColumnDescriptor { + // The identifier for the column. Each entry in `path` represents one level + // of nesting. + repeated string path = 1; + + // A textual description of the column. + string description = 2; + + // A list of BigQuery policy tags that will be applied to the column. + repeated string bigquery_policy_tags = 3; + } + + // A text description of the relation. + string description = 1; + + // A list of descriptions of columns within the relation. + repeated ColumnDescriptor columns = 2; + + // A set of BigQuery labels that should be applied to the relation. + map bigquery_labels = 3; +} + +// Represents a single Dataform action in a compilation result. +message CompilationResultAction { + // Represents a database relation. + message Relation { + // Indicates the type of this relation. + enum RelationType { + // Default value. This value is unused. + RELATION_TYPE_UNSPECIFIED = 0; + + // The relation is a table. + TABLE = 1; + + // The relation is a view. + VIEW = 2; + + // The relation is an incrementalized table. + INCREMENTAL_TABLE = 3; + + // The relation is a materialized view. + MATERIALIZED_VIEW = 4; + } + + // Contains settings for relations of type `INCREMENTAL_TABLE`. + message IncrementalTableConfig { + // The SELECT query which returns rows which should be inserted into the + // relation if it already exists and is not being refreshed. + string incremental_select_query = 1; + + // Whether this table should be protected from being refreshed. + bool refresh_disabled = 2; + + // A set of columns or SQL expressions used to define row uniqueness. + // If any duplicates are discovered (as defined by `unique_key_parts`), + // only the newly selected rows (as defined by `incremental_select_query`) + // will be included in the relation. + repeated string unique_key_parts = 3; + + // A SQL expression conditional used to limit the set of existing rows + // considered for a merge operation (see `unique_key_parts` for more + // information). + string update_partition_filter = 4; + + // SQL statements to be executed before inserting new rows into the + // relation. + repeated string incremental_pre_operations = 5; + + // SQL statements to be executed after inserting new rows into the + // relation. + repeated string incremental_post_operations = 6; + } + + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // Descriptor for the relation and its columns. + RelationDescriptor relation_descriptor = 4; + + // The type of this relation. + RelationType relation_type = 5; + + // The SELECT query which returns rows which this relation should contain. + string select_query = 6; + + // SQL statements to be executed before creating the relation. + repeated string pre_operations = 7; + + // SQL statements to be executed after creating the relation. + repeated string post_operations = 8; + + // Configures `INCREMENTAL_TABLE` settings for this relation. Only set if + // `relation_type` is `INCREMENTAL_TABLE`. + IncrementalTableConfig incremental_table_config = 9; + + // The SQL expression used to partition the relation. + string partition_expression = 10; + + // A list of columns or SQL expressions used to cluster the table. + repeated string cluster_expressions = 11; + + // Sets the partition expiration in days. + int32 partition_expiration_days = 12; + + // Specifies whether queries on this table must include a predicate filter + // that filters on the partitioning column. + bool require_partition_filter = 13; + + // Additional options that will be provided as key/value pairs into the + // options clause of a create table/view statement. See + // https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language + // for more information on which options are supported. + map additional_options = 14; + } + + // Represents a list of arbitrary database operations. + message Operations { + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // Descriptor for any output relation and its columns. Only set if + // `has_output` is true. + RelationDescriptor relation_descriptor = 6; + + // A list of arbitrary SQL statements that will be executed without + // alteration. + repeated string queries = 4; + + // Whether these operations produce an output relation. + bool has_output = 5; + } + + // Represents an assertion upon a SQL query which is required return zero + // rows. + message Assertion { + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // The parent action of this assertion. Only set if this assertion was + // automatically generated. + Target parent_action = 5; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // The SELECT query which must return zero rows in order for this assertion + // to succeed. + string select_query = 4; + + // Descriptor for the assertion's automatically-generated view and its + // columns. + RelationDescriptor relation_descriptor = 6; + } + + // Represents a relation which is not managed by Dataform but which may be + // referenced by Dataform actions. + message Declaration { + // Descriptor for the relation and its columns. Used as documentation only, + // i.e. values here will result in no changes to the relation's metadata. + RelationDescriptor relation_descriptor = 1; + } + + // This action's identifier. Unique within the compilation result. + Target target = 1; + + // The action's identifier if the project had been compiled without any + // overrides configured. Unique within the compilation result. + Target canonical_target = 2; + + // The full path including filename in which this action is located, relative + // to the workspace root. + string file_path = 3; + + oneof compiled_object { + // The database relation created/updated by this action. + Relation relation = 4; + + // The database operations executed by this action. + Operations operations = 5; + + // The assertion executed by this action. + Assertion assertion = 6; + + // The declaration declared by this action. + Declaration declaration = 7; + } +} + +// `QueryCompilationResultActions` request message. +message QueryCompilationResultActionsRequest { + // Required. The compilation result's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; + + // Optional. Maximum number of compilation results to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryCompilationResultActions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryCompilationResultActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional filter for the returned list. Filtering is only currently + // supported on the `file_path` field. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryCompilationResultActions` response message. +message QueryCompilationResultActionsResponse { + // List of compilation result actions. + repeated CompilationResultAction compilation_result_actions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Represents a single invocation of a compilation result. +message WorkflowInvocation { + option (google.api.resource) = { + type: "dataform.googleapis.com/WorkflowInvocation" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}" + }; + + // Includes various configuration options for this workflow invocation. + // If both `included_targets` and `included_tags` are unset, all actions + // will be included. + message InvocationConfig { + // Immutable. The set of action identifiers to include. + repeated Target included_targets = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The set of tags to include. + repeated string included_tags = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, transitive dependencies of included actions will be + // executed. + bool transitive_dependencies_included = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, transitive dependents of included actions will be + // executed. + bool transitive_dependents_included = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, any incremental tables will be fully refreshed. + bool fully_refresh_incremental_tables_enabled = 5 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Represents the current state of a workflow invocation. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The workflow invocation is currently running. + RUNNING = 1; + + // The workflow invocation succeeded. A terminal state. + SUCCEEDED = 2; + + // The workflow invocation was cancelled. A terminal state. + CANCELLED = 3; + + // The workflow invocation failed. A terminal state. + FAILED = 4; + + // The workflow invocation is being cancelled, but some actions are still + // running. + CANCELING = 5; + } + + // Output only. The workflow invocation's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The name of the compilation result to compile. Must be in the format + // `projects/*/locations/*/repositories/*/compilationResults/*`. + string compilation_result = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; + + // Immutable. If left unset, a default InvocationConfig will be used. + InvocationConfig invocation_config = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. This workflow invocation's current state. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This workflow invocation's timing details. + google.type.Interval invocation_timing = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListWorkflowInvocations` request message. +message ListWorkflowInvocationsRequest { + // Required. The parent resource of the WorkflowInvocation type. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of workflow invocations to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListWorkflowInvocations` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkflowInvocations` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListWorkflowInvocations` response message. +message ListWorkflowInvocationsResponse { + // List of workflow invocations. + repeated WorkflowInvocation workflow_invocations = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetWorkflowInvocation` request message. +message GetWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// `CreateWorkflowInvocation` request message. +message CreateWorkflowInvocationRequest { + // Required. The parent resource of the WorkflowInvocation type. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The workflow invocation resource to create. + WorkflowInvocation workflow_invocation = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteWorkflowInvocation` request message. +message DeleteWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// `CancelWorkflowInvocation` request message. +message CancelWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// Represents a single action in a workflow invocation. +message WorkflowInvocationAction { + // Represents the current state of an workflow invocation action. + enum State { + // The action has not yet been considered for invocation. + PENDING = 0; + + // The action is currently running. + RUNNING = 1; + + // Execution of the action was skipped because upstream dependencies did not + // all complete successfully. A terminal state. + SKIPPED = 2; + + // Execution of the action was disabled as per the configuration of the + // corresponding compilation result action. A terminal state. + DISABLED = 3; + + // The action succeeded. A terminal state. + SUCCEEDED = 4; + + // The action was cancelled. A terminal state. + CANCELLED = 5; + + // The action failed. A terminal state. + FAILED = 6; + } + + // Represents a workflow action that will run against BigQuery. + message BigQueryAction { + // Output only. The generated BigQuery SQL script that will be executed. + string sql_script = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. This action's identifier. Unique within the workflow invocation. + Target target = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The action's identifier if the project had been compiled without any + // overrides configured. Unique within the compilation result. + Target canonical_target = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This action's current state. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If and only if action's state is FAILED a failure reason is set. + string failure_reason = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This action's timing details. + // `start_time` will be set if the action is in [RUNNING, SUCCEEDED, + // CANCELLED, FAILED] state. + // `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED] + // state. + google.type.Interval invocation_timing = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The workflow action's bigquery action details. + BigQueryAction bigquery_action = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `QueryWorkflowInvocationActions` request message. +message QueryWorkflowInvocationActionsRequest { + // Required. The workflow invocation's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; + + // Optional. Maximum number of workflow invocations to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryWorkflowInvocationActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryWorkflowInvocationActions` response message. +message QueryWorkflowInvocationActionsResponse { + // List of workflow invocation actions. + repeated WorkflowInvocationAction workflow_invocation_actions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/packages/google-cloud-dataform/protos/google/cloud/dataform/v1beta1/dataform.proto b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1beta1/dataform.proto new file mode 100644 index 00000000000..466459c3092 --- /dev/null +++ b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1beta1/dataform.proto @@ -0,0 +1,1629 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/type/interval.proto"; + +option csharp_namespace = "Google.Cloud.Dataform.V1Beta1"; +option go_package = "cloud.google.com/go/dataform/apiv1beta1/dataformpb;dataformpb"; +option java_multiple_files = true; +option java_outer_classname = "DataformProto"; +option java_package = "com.google.cloud.dataform.v1beta1"; +option php_namespace = "Google\\Cloud\\Dataform\\V1beta1"; +option ruby_package = "Google::Cloud::Dataform::V1beta1"; +option (google.api.resource_definition) = { + type: "secretmanager.googleapis.com/SecretVersion" + pattern: "projects/{project}/secrets/{secret}/versions/{version}" +}; + +// Dataform is a service to develop, create, document, test, and update curated +// tables in BigQuery. +service Dataform { + option (google.api.default_host) = "dataform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Repositories in a given project and location. + rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/repositories" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single Repository. + rpc GetRepository(GetRepositoryRequest) returns (Repository) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Repository in a given project and location. + rpc CreateRepository(CreateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/repositories" + body: "repository" + }; + option (google.api.method_signature) = "parent,repository,repository_id"; + } + + // Updates a single Repository. + rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + patch: "/v1beta1/{repository.name=projects/*/locations/*/repositories/*}" + body: "repository" + }; + option (google.api.method_signature) = "repository,update_mask"; + } + + // Deletes a single Repository. + rpc DeleteRepository(DeleteRepositoryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Fetches a Repository's remote branches. + rpc FetchRemoteBranches(FetchRemoteBranchesRequest) returns (FetchRemoteBranchesResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + }; + } + + // Lists Workspaces in a given Repository. + rpc ListWorkspaces(ListWorkspacesRequest) returns (ListWorkspacesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single Workspace. + rpc GetWorkspace(GetWorkspaceRequest) returns (Workspace) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Workspace in a given Repository. + rpc CreateWorkspace(CreateWorkspaceRequest) returns (Workspace) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces" + body: "workspace" + }; + option (google.api.method_signature) = "parent,workspace,workspace_id"; + } + + // Deletes a single Workspace. + rpc DeleteWorkspace(DeleteWorkspaceRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Installs dependency NPM packages (inside a Workspace). + rpc InstallNpmPackages(InstallNpmPackagesRequest) returns (InstallNpmPackagesResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages" + body: "*" + }; + } + + // Pulls Git commits from the Repository's remote into a Workspace. + rpc PullGitCommits(PullGitCommitsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull" + body: "*" + }; + } + + // Pushes Git commits from a Workspace to the Repository's remote. + rpc PushGitCommits(PushGitCommitsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push" + body: "*" + }; + } + + // Fetches Git statuses for the files in a Workspace. + rpc FetchFileGitStatuses(FetchFileGitStatusesRequest) returns (FetchFileGitStatusesResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + }; + } + + // Fetches Git ahead/behind against a remote branch. + rpc FetchGitAheadBehind(FetchGitAheadBehindRequest) returns (FetchGitAheadBehindResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + }; + } + + // Applies a Git commit for uncommitted files in a Workspace. + rpc CommitWorkspaceChanges(CommitWorkspaceChangesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit" + body: "*" + }; + } + + // Performs a Git reset for uncommitted files in a Workspace. + rpc ResetWorkspaceChanges(ResetWorkspaceChangesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset" + body: "*" + }; + } + + // Fetches Git diff for an uncommitted file in a Workspace. + rpc FetchFileDiff(FetchFileDiffRequest) returns (FetchFileDiffResponse) { + option (google.api.http) = { + get: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + }; + } + + // Returns the contents of a given Workspace directory. + rpc QueryDirectoryContents(QueryDirectoryContentsRequest) returns (QueryDirectoryContentsResponse) { + option (google.api.http) = { + get: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + }; + } + + // Creates a directory inside a Workspace. + rpc MakeDirectory(MakeDirectoryRequest) returns (MakeDirectoryResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory" + body: "*" + }; + } + + // Deletes a directory (inside a Workspace) and all of its contents. + rpc RemoveDirectory(RemoveDirectoryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory" + body: "*" + }; + } + + // Moves a directory (inside a Workspace), and all of its contents, to a new + // location. + rpc MoveDirectory(MoveDirectoryRequest) returns (MoveDirectoryResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory" + body: "*" + }; + } + + // Returns the contents of a file (inside a Workspace). + rpc ReadFile(ReadFileRequest) returns (ReadFileResponse) { + option (google.api.http) = { + get: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + }; + } + + // Deletes a file (inside a Workspace). + rpc RemoveFile(RemoveFileRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile" + body: "*" + }; + } + + // Moves a file (inside a Workspace) to a new location. + rpc MoveFile(MoveFileRequest) returns (MoveFileResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile" + body: "*" + }; + } + + // Writes to a file (inside a Workspace). + rpc WriteFile(WriteFileRequest) returns (WriteFileResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile" + body: "*" + }; + } + + // Lists CompilationResults in a given Repository. + rpc ListCompilationResults(ListCompilationResultsRequest) returns (ListCompilationResultsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single CompilationResult. + rpc GetCompilationResult(GetCompilationResultRequest) returns (CompilationResult) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new CompilationResult in a given project and location. + rpc CreateCompilationResult(CreateCompilationResultRequest) returns (CompilationResult) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults" + body: "compilation_result" + }; + option (google.api.method_signature) = "parent,compilation_result"; + } + + // Returns CompilationResultActions in a given CompilationResult. + rpc QueryCompilationResultActions(QueryCompilationResultActionsRequest) returns (QueryCompilationResultActionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + }; + } + + // Lists WorkflowInvocations in a given Repository. + rpc ListWorkflowInvocations(ListWorkflowInvocationsRequest) returns (ListWorkflowInvocationsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single WorkflowInvocation. + rpc GetWorkflowInvocation(GetWorkflowInvocationRequest) returns (WorkflowInvocation) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new WorkflowInvocation in a given Repository. + rpc CreateWorkflowInvocation(CreateWorkflowInvocationRequest) returns (WorkflowInvocation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + body: "workflow_invocation" + }; + option (google.api.method_signature) = "parent,workflow_invocation"; + } + + // Deletes a single WorkflowInvocation. + rpc DeleteWorkflowInvocation(DeleteWorkflowInvocationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Requests cancellation of a running WorkflowInvocation. + rpc CancelWorkflowInvocation(CancelWorkflowInvocationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel" + body: "*" + }; + } + + // Returns WorkflowInvocationActions in a given WorkflowInvocation. + rpc QueryWorkflowInvocationActions(QueryWorkflowInvocationActionsRequest) returns (QueryWorkflowInvocationActionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + }; + } +} + +// Represents a Dataform Git repository. +message Repository { + option (google.api.resource) = { + type: "dataform.googleapis.com/Repository" + pattern: "projects/{project}/locations/{location}/repositories/{repository}" + }; + + // Controls Git remote configuration for a repository. + message GitRemoteSettings { + // Indicates the status of a Git authentication token. + enum TokenStatus { + // Default value. This value is unused. + TOKEN_STATUS_UNSPECIFIED = 0; + + // The token could not be found in Secret Manager (or the Dataform + // Service Account did not have permission to access it). + NOT_FOUND = 1; + + // The token could not be used to authenticate against the Git remote. + INVALID = 2; + + // The token was used successfully to authenticate against the Git remote. + VALID = 3; + } + + // Required. The Git remote's URL. + string url = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Git remote's default branch name. + string default_branch = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the Secret Manager secret version to use as an + // authentication token for Git operations. Must be in the format + // `projects/*/secrets/*/versions/*`. + string authentication_token_secret_version = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Output only. Indicates the status of the Git access token. + TokenStatus token_status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The repository's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. If set, configures this repository to be linked to a Git remote. + GitRemoteSettings git_remote_settings = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListRepositories` request message. +message ListRepositoriesRequest { + // Required. The location in which to list repositories. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of repositories to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListRepositories` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListRepositories` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field only supports ordering by `name`. If unspecified, the server + // will choose the ordering. If specified, the default order is ascending for + // the `name` field. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the returned list. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListRepositories` response message. +message ListRepositoriesResponse { + // List of repositories. + repeated Repository repositories = 1; + + // A token which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetRepository` request message. +message GetRepositoryRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; +} + +// `CreateRepository` request message. +message CreateRepositoryRequest { + // Required. The location in which to create the repository. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The repository to create. + Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the repository, which will become the final component of + // the repository's resource name. + string repository_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `UpdateRepository` request message. +message UpdateRepositoryRequest { + // Optional. Specifies the fields to be updated in the repository. If left unset, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The repository to update. + Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteRepository` request message. +message DeleteRepositoryRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // If set to true, any child resources of this repository will also be + // deleted. (Otherwise, the request will only succeed if the repository has no + // child resources.) + bool force = 2; +} + +// `FetchRemoteBranches` request message. +message FetchRemoteBranchesRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; +} + +// `FetchRemoteBranches` response message. +message FetchRemoteBranchesResponse { + // The remote repository's branch names. + repeated string branches = 1; +} + +// Represents a Dataform Git workspace. +message Workspace { + option (google.api.resource) = { + type: "dataform.googleapis.com/Workspace" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}" + }; + + // Output only. The workspace's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListWorkspaces` request message. +message ListWorkspacesRequest { + // Required. The repository in which to list workspaces. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of workspaces to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListWorkspaces` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkspaces` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field only supports ordering by `name`. If unspecified, the server + // will choose the ordering. If specified, the default order is ascending for + // the `name` field. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the returned list. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListWorkspaces` response message. +message ListWorkspacesResponse { + // List of workspaces. + repeated Workspace workspaces = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetWorkspace` request message. +message GetWorkspaceRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `CreateWorkspace` request message. +message CreateWorkspaceRequest { + // Required. The repository in which to create the workspace. Must be in the format + // `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The workspace to create. + Workspace workspace = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the workspace, which will become the final component of + // the workspace's resource name. + string workspace_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteWorkspace` request message. +message DeleteWorkspaceRequest { + // Required. The workspace resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// Represents the author of a Git commit. +message CommitAuthor { + // Required. The commit author's name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The commit author's email address. + string email_address = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `PullGitCommits` request message. +message PullGitCommitsRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote from which to pull commits. + // If left unset, the repository's default branch name will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The author of any merge commit which may be created as a result of merging + // fetched Git commits into this workspace. + CommitAuthor author = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `PushGitCommits` request message. +message PushGitCommitsRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote to which commits should be pushed. + // If left unset, the repository's default branch name will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchFileGitStatuses` request message. +message FetchFileGitStatusesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `FetchFileGitStatuses` response message. +message FetchFileGitStatusesResponse { + // Represents the Git state of a file with uncommitted changes. + message UncommittedFileChange { + // Indicates the status of an uncommitted file change. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The file has been newly added. + ADDED = 1; + + // The file has been deleted. + DELETED = 2; + + // The file has been modified. + MODIFIED = 3; + + // The file contains merge conflicts. + HAS_CONFLICTS = 4; + } + + // The file's full path including filename, relative to the workspace root. + string path = 1; + + // Indicates the status of the file. + State state = 2; + } + + // A list of all files which have uncommitted Git changes. There will only be + // a single entry for any given file. + repeated UncommittedFileChange uncommitted_file_changes = 1; +} + +// `FetchGitAheadBehind` request message. +message FetchGitAheadBehindRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote against which this workspace + // should be compared. If left unset, the repository's default branch name + // will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchGitAheadBehind` response message. +message FetchGitAheadBehindResponse { + // The number of commits in the remote branch that are not in the workspace. + int32 commits_ahead = 1; + + // The number of commits in the workspace that are not in the remote branch. + int32 commits_behind = 2; +} + +// `CommitWorkspaceChanges` request message. +message CommitWorkspaceChangesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The commit's author. + CommitAuthor author = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The commit's message. + string commit_message = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Full file paths to commit including filename, rooted at workspace root. If + // left empty, all files will be committed. + repeated string paths = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ResetWorkspaceChanges` request message. +message ResetWorkspaceChangesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. Full file paths to reset back to their committed state including filename, + // rooted at workspace root. If left empty, all files will be reset. + repeated string paths = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, untracked files will be deleted. + bool clean = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchFileDiff` request message. +message FetchFileDiffRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `FetchFileDiff` response message. +message FetchFileDiffResponse { + // The raw formatted Git diff for the file. + string formatted_diff = 1; +} + +// `QueryDirectoryContents` request message. +message QueryDirectoryContentsRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The directory's full path including directory name, relative to the + // workspace root. If left unset, the workspace root is used. + string path = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of paths to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryDirectoryContents` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryDirectoryContents` must match the call that provided the page + // token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryDirectoryContents` response message. +message QueryDirectoryContentsResponse { + // Represents a single entry in a workspace directory. + message DirectoryEntry { + oneof entry { + // A file in the directory. + string file = 1; + + // A child directory in the directory. + string directory = 2; + } + } + + // List of entries in the directory. + repeated DirectoryEntry directory_entries = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// `MakeDirectory` request message. +message MakeDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MakeDirectory` response message. +message MakeDirectoryResponse { + +} + +// `RemoveDirectory` request message. +message RemoveDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveDirectory` request message. +message MoveDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new path for the directory including directory name, rooted at + // workspace root. + string new_path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveDirectory` response message. +message MoveDirectoryResponse { + +} + +// `ReadFile` request message. +message ReadFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `ReadFile` response message. +message ReadFileResponse { + // The file's contents. + bytes file_contents = 1; +} + +// `RemoveFile` request message. +message RemoveFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveFile` request message. +message MoveFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The file's new path including filename, relative to the workspace root. + string new_path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveFile` response message. +message MoveFileResponse { + +} + +// `WriteFile` request message. +message WriteFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The file's contents. + bytes contents = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `WriteFile` response message. +message WriteFileResponse { + +} + +// `InstallNpmPackages` request message. +message InstallNpmPackagesRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `InstallNpmPackages` response message. +message InstallNpmPackagesResponse { + +} + +// Represents the result of compiling a Dataform project. +message CompilationResult { + option (google.api.resource) = { + type: "dataform.googleapis.com/CompilationResult" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}" + }; + + // Configures various aspects of Dataform code compilation. + message CodeCompilationConfig { + // Optional. The default database (Google Cloud project ID). + string default_database = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default schema (BigQuery dataset ID). + string default_schema = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default BigQuery location to use. Defaults to "US". + // See the BigQuery docs for a full list of locations: + // https://cloud.google.com/bigquery/docs/locations. + string default_location = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default schema (BigQuery dataset ID) for assertions. + string assertion_schema = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined variables that are made available to project code during + // compilation. + map vars = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all database (Google Cloud project + // ID) names. + string database_suffix = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all schema (BigQuery dataset ID) + // names. + string schema_suffix = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The prefix that should be prepended to all table names. + string table_prefix = 7 [(google.api.field_behavior) = OPTIONAL]; + } + + // An error encountered when attempting to compile a Dataform project. + message CompilationError { + // Output only. The error's top level message. + string message = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The error's full stack trace. + string stack = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The path of the file where this error occurred, if available, relative to + // the project root. + string path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The identifier of the action where this error occurred, if available. + Target action_target = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The compilation result's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + oneof source { + // Immutable. Git commit/tag/branch name at which the repository should be compiled. + // Must exist in the remote repository. + // Examples: + // - a commit SHA: `12ade345` + // - a tag: `tag1` + // - a branch name: `branch1` + string git_commitish = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The name of the workspace to compile. Must be in the format + // `projects/*/locations/*/repositories/*/workspaces/*`. + string workspace = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + } + + // Immutable. If set, fields of `code_compilation_overrides` override the default + // compilation settings that are specified in dataform.json. + CodeCompilationConfig code_compilation_config = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The version of `@dataform/core` that was used for compilation. + string dataform_core_version = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Errors encountered during project compilation. + repeated CompilationError compilation_errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListCompilationResults` request message. +message ListCompilationResultsRequest { + // Required. The repository in which to list compilation results. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of compilation results to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListCompilationResults` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCompilationResults` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListCompilationResults` response message. +message ListCompilationResultsResponse { + // List of compilation results. + repeated CompilationResult compilation_results = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetCompilationResult` request message. +message GetCompilationResultRequest { + // Required. The compilation result's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; +} + +// `CreateCompilationResult` request message. +message CreateCompilationResultRequest { + // Required. The repository in which to create the compilation result. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The compilation result to create. + CompilationResult compilation_result = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents an action identifier. If the action writes output, the output +// will be written to the referenced database object. +message Target { + // The action's database (Google Cloud project ID) . + string database = 1; + + // The action's schema (BigQuery dataset ID), within `database`. + string schema = 2; + + // The action's name, within `database` and `schema`. + string name = 3; +} + +// Describes a relation and its columns. +message RelationDescriptor { + // Describes a column. + message ColumnDescriptor { + // The identifier for the column. Each entry in `path` represents one level + // of nesting. + repeated string path = 1; + + // A textual description of the column. + string description = 2; + + // A list of BigQuery policy tags that will be applied to the column. + repeated string bigquery_policy_tags = 3; + } + + // A text description of the relation. + string description = 1; + + // A list of descriptions of columns within the relation. + repeated ColumnDescriptor columns = 2; + + // A set of BigQuery labels that should be applied to the relation. + map bigquery_labels = 3; +} + +// Represents a single Dataform action in a compilation result. +message CompilationResultAction { + // Represents a database relation. + message Relation { + // Indicates the type of this relation. + enum RelationType { + // Default value. This value is unused. + RELATION_TYPE_UNSPECIFIED = 0; + + // The relation is a table. + TABLE = 1; + + // The relation is a view. + VIEW = 2; + + // The relation is an incrementalized table. + INCREMENTAL_TABLE = 3; + + // The relation is a materialized view. + MATERIALIZED_VIEW = 4; + } + + // Contains settings for relations of type `INCREMENTAL_TABLE`. + message IncrementalTableConfig { + // The SELECT query which returns rows which should be inserted into the + // relation if it already exists and is not being refreshed. + string incremental_select_query = 1; + + // Whether this table should be protected from being refreshed. + bool refresh_disabled = 2; + + // A set of columns or SQL expressions used to define row uniqueness. + // If any duplicates are discovered (as defined by `unique_key_parts`), + // only the newly selected rows (as defined by `incremental_select_query`) + // will be included in the relation. + repeated string unique_key_parts = 3; + + // A SQL expression conditional used to limit the set of existing rows + // considered for a merge operation (see `unique_key_parts` for more + // information). + string update_partition_filter = 4; + + // SQL statements to be executed before inserting new rows into the + // relation. + repeated string incremental_pre_operations = 5; + + // SQL statements to be executed after inserting new rows into the + // relation. + repeated string incremental_post_operations = 6; + } + + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // Descriptor for the relation and its columns. + RelationDescriptor relation_descriptor = 4; + + // The type of this relation. + RelationType relation_type = 5; + + // The SELECT query which returns rows which this relation should contain. + string select_query = 6; + + // SQL statements to be executed before creating the relation. + repeated string pre_operations = 7; + + // SQL statements to be executed after creating the relation. + repeated string post_operations = 8; + + // Configures `INCREMENTAL_TABLE` settings for this relation. Only set if + // `relation_type` is `INCREMENTAL_TABLE`. + IncrementalTableConfig incremental_table_config = 9; + + // The SQL expression used to partition the relation. + string partition_expression = 10; + + // A list of columns or SQL expressions used to cluster the table. + repeated string cluster_expressions = 11; + + // Sets the partition expiration in days. + int32 partition_expiration_days = 12; + + // Specifies whether queries on this table must include a predicate filter + // that filters on the partitioning column. + bool require_partition_filter = 13; + + // Additional options that will be provided as key/value pairs into the + // options clause of a create table/view statement. See + // https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language + // for more information on which options are supported. + map additional_options = 14; + } + + // Represents a list of arbitrary database operations. + message Operations { + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // Descriptor for any output relation and its columns. Only set if + // `has_output` is true. + RelationDescriptor relation_descriptor = 6; + + // A list of arbitrary SQL statements that will be executed without + // alteration. + repeated string queries = 4; + + // Whether these operations produce an output relation. + bool has_output = 5; + } + + // Represents an assertion upon a SQL query which is required return zero + // rows. + message Assertion { + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // The parent action of this assertion. Only set if this assertion was + // automatically generated. + Target parent_action = 5; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // The SELECT query which must return zero rows in order for this assertion + // to succeed. + string select_query = 4; + + // Descriptor for the assertion's automatically-generated view and its + // columns. + RelationDescriptor relation_descriptor = 6; + } + + // Represents a relation which is not managed by Dataform but which may be + // referenced by Dataform actions. + message Declaration { + // Descriptor for the relation and its columns. Used as documentation only, + // i.e. values here will result in no changes to the relation's metadata. + RelationDescriptor relation_descriptor = 1; + } + + // This action's identifier. Unique within the compilation result. + Target target = 1; + + // The action's identifier if the project had been compiled without any + // overrides configured. Unique within the compilation result. + Target canonical_target = 2; + + // The full path including filename in which this action is located, relative + // to the workspace root. + string file_path = 3; + + oneof compiled_object { + // The database relation created/updated by this action. + Relation relation = 4; + + // The database operations executed by this action. + Operations operations = 5; + + // The assertion executed by this action. + Assertion assertion = 6; + + // The declaration declared by this action. + Declaration declaration = 7; + } +} + +// `QueryCompilationResultActions` request message. +message QueryCompilationResultActionsRequest { + // Required. The compilation result's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; + + // Optional. Maximum number of compilation results to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryCompilationResultActions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryCompilationResultActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional filter for the returned list. Filtering is only currently + // supported on the `file_path` field. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryCompilationResultActions` response message. +message QueryCompilationResultActionsResponse { + // List of compilation result actions. + repeated CompilationResultAction compilation_result_actions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Represents a single invocation of a compilation result. +message WorkflowInvocation { + option (google.api.resource) = { + type: "dataform.googleapis.com/WorkflowInvocation" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}" + }; + + // Includes various configuration options for this workflow invocation. + // If both `included_targets` and `included_tags` are unset, all actions + // will be included. + message InvocationConfig { + // Immutable. The set of action identifiers to include. + repeated Target included_targets = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The set of tags to include. + repeated string included_tags = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, transitive dependencies of included actions will be + // executed. + bool transitive_dependencies_included = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, transitive dependents of included actions will be + // executed. + bool transitive_dependents_included = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, any incremental tables will be fully refreshed. + bool fully_refresh_incremental_tables_enabled = 5 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Represents the current state of a workflow invocation. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The workflow invocation is currently running. + RUNNING = 1; + + // The workflow invocation succeeded. A terminal state. + SUCCEEDED = 2; + + // The workflow invocation was cancelled. A terminal state. + CANCELLED = 3; + + // The workflow invocation failed. A terminal state. + FAILED = 4; + + // The workflow invocation is being cancelled, but some actions are still + // running. + CANCELING = 5; + } + + // Output only. The workflow invocation's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The name of the compilation result to compile. Must be in the format + // `projects/*/locations/*/repositories/*/compilationResults/*`. + string compilation_result = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; + + // Immutable. If left unset, a default InvocationConfig will be used. + InvocationConfig invocation_config = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. This workflow invocation's current state. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This workflow invocation's timing details. + google.type.Interval invocation_timing = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListWorkflowInvocations` request message. +message ListWorkflowInvocationsRequest { + // Required. The parent resource of the WorkflowInvocation type. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of workflow invocations to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListWorkflowInvocations` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkflowInvocations` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListWorkflowInvocations` response message. +message ListWorkflowInvocationsResponse { + // List of workflow invocations. + repeated WorkflowInvocation workflow_invocations = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetWorkflowInvocation` request message. +message GetWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// `CreateWorkflowInvocation` request message. +message CreateWorkflowInvocationRequest { + // Required. The repository in which to create the workflow invocation. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The workflow invocation resource to create. + WorkflowInvocation workflow_invocation = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteWorkflowInvocation` request message. +message DeleteWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// `CancelWorkflowInvocation` request message. +message CancelWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// Represents a single action in a workflow invocation. +message WorkflowInvocationAction { + // Represents the current state of an workflow invocation action. + enum State { + // The action has not yet been considered for invocation. + PENDING = 0; + + // The action is currently running. + RUNNING = 1; + + // Execution of the action was skipped because upstream dependencies did not + // all complete successfully. A terminal state. + SKIPPED = 2; + + // Execution of the action was disabled as per the configuration of the + // corresponding compilation result action. A terminal state. + DISABLED = 3; + + // The action succeeded. A terminal state. + SUCCEEDED = 4; + + // The action was cancelled. A terminal state. + CANCELLED = 5; + + // The action failed. A terminal state. + FAILED = 6; + } + + // Represents a workflow action that will run against BigQuery. + message BigQueryAction { + // Output only. The generated BigQuery SQL script that will be executed. + string sql_script = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. This action's identifier. Unique within the workflow invocation. + Target target = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The action's identifier if the project had been compiled without any + // overrides configured. Unique within the compilation result. + Target canonical_target = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This action's current state. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If and only if action's state is FAILED a failure reason is set. + string failure_reason = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This action's timing details. + // `start_time` will be set if the action is in [RUNNING, SUCCEEDED, + // CANCELLED, FAILED] state. + // `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED] + // state. + google.type.Interval invocation_timing = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The workflow action's bigquery action details. + BigQueryAction bigquery_action = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `QueryWorkflowInvocationActions` request message. +message QueryWorkflowInvocationActionsRequest { + // Required. The workflow invocation's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; + + // Optional. Maximum number of workflow invocations to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryWorkflowInvocationActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryWorkflowInvocationActions` response message. +message QueryWorkflowInvocationActionsResponse { + // List of workflow invocation actions. + repeated WorkflowInvocationAction workflow_invocation_actions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/packages/google-cloud-dataform/protos/protos.d.ts b/packages/google-cloud-dataform/protos/protos.d.ts new file mode 100644 index 00000000000..6139767e7bb --- /dev/null +++ b/packages/google-cloud-dataform/protos/protos.d.ts @@ -0,0 +1,22256 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace dataform. */ + namespace dataform { + + /** Namespace v1alpha2. */ + namespace v1alpha2 { + + /** Represents a Dataform */ + class Dataform extends $protobuf.rpc.Service { + + /** + * Constructs a new Dataform service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Dataform service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Dataform; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRepositoriesResponse + */ + public listRepositories(request: google.cloud.dataform.v1alpha2.IListRepositoriesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.ListRepositoriesCallback): void; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @returns Promise + */ + public listRepositories(request: google.cloud.dataform.v1alpha2.IListRepositoriesRequest): Promise; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public getRepository(request: google.cloud.dataform.v1alpha2.IGetRepositoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.GetRepositoryCallback): void; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @returns Promise + */ + public getRepository(request: google.cloud.dataform.v1alpha2.IGetRepositoryRequest): Promise; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public createRepository(request: google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.CreateRepositoryCallback): void; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @returns Promise + */ + public createRepository(request: google.cloud.dataform.v1alpha2.ICreateRepositoryRequest): Promise; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public updateRepository(request: google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.UpdateRepositoryCallback): void; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @returns Promise + */ + public updateRepository(request: google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest): Promise; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteRepository(request: google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.DeleteRepositoryCallback): void; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @returns Promise + */ + public deleteRepository(request: google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest): Promise; + + /** + * Calls FetchRemoteBranches. + * @param request FetchRemoteBranchesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchRemoteBranchesResponse + */ + public fetchRemoteBranches(request: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.FetchRemoteBranchesCallback): void; + + /** + * Calls FetchRemoteBranches. + * @param request FetchRemoteBranchesRequest message or plain object + * @returns Promise + */ + public fetchRemoteBranches(request: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest): Promise; + + /** + * Calls ListWorkspaces. + * @param request ListWorkspacesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkspacesResponse + */ + public listWorkspaces(request: google.cloud.dataform.v1alpha2.IListWorkspacesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.ListWorkspacesCallback): void; + + /** + * Calls ListWorkspaces. + * @param request ListWorkspacesRequest message or plain object + * @returns Promise + */ + public listWorkspaces(request: google.cloud.dataform.v1alpha2.IListWorkspacesRequest): Promise; + + /** + * Calls GetWorkspace. + * @param request GetWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Workspace + */ + public getWorkspace(request: google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, callback: google.cloud.dataform.v1alpha2.Dataform.GetWorkspaceCallback): void; + + /** + * Calls GetWorkspace. + * @param request GetWorkspaceRequest message or plain object + * @returns Promise + */ + public getWorkspace(request: google.cloud.dataform.v1alpha2.IGetWorkspaceRequest): Promise; + + /** + * Calls CreateWorkspace. + * @param request CreateWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Workspace + */ + public createWorkspace(request: google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, callback: google.cloud.dataform.v1alpha2.Dataform.CreateWorkspaceCallback): void; + + /** + * Calls CreateWorkspace. + * @param request CreateWorkspaceRequest message or plain object + * @returns Promise + */ + public createWorkspace(request: google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest): Promise; + + /** + * Calls DeleteWorkspace. + * @param request DeleteWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteWorkspace(request: google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, callback: google.cloud.dataform.v1alpha2.Dataform.DeleteWorkspaceCallback): void; + + /** + * Calls DeleteWorkspace. + * @param request DeleteWorkspaceRequest message or plain object + * @returns Promise + */ + public deleteWorkspace(request: google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest): Promise; + + /** + * Calls InstallNpmPackages. + * @param request InstallNpmPackagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InstallNpmPackagesResponse + */ + public installNpmPackages(request: google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.InstallNpmPackagesCallback): void; + + /** + * Calls InstallNpmPackages. + * @param request InstallNpmPackagesRequest message or plain object + * @returns Promise + */ + public installNpmPackages(request: google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest): Promise; + + /** + * Calls PullGitCommits. + * @param request PullGitCommitsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public pullGitCommits(request: google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.PullGitCommitsCallback): void; + + /** + * Calls PullGitCommits. + * @param request PullGitCommitsRequest message or plain object + * @returns Promise + */ + public pullGitCommits(request: google.cloud.dataform.v1alpha2.IPullGitCommitsRequest): Promise; + + /** + * Calls PushGitCommits. + * @param request PushGitCommitsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public pushGitCommits(request: google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.PushGitCommitsCallback): void; + + /** + * Calls PushGitCommits. + * @param request PushGitCommitsRequest message or plain object + * @returns Promise + */ + public pushGitCommits(request: google.cloud.dataform.v1alpha2.IPushGitCommitsRequest): Promise; + + /** + * Calls FetchFileGitStatuses. + * @param request FetchFileGitStatusesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchFileGitStatusesResponse + */ + public fetchFileGitStatuses(request: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.FetchFileGitStatusesCallback): void; + + /** + * Calls FetchFileGitStatuses. + * @param request FetchFileGitStatusesRequest message or plain object + * @returns Promise + */ + public fetchFileGitStatuses(request: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest): Promise; + + /** + * Calls FetchGitAheadBehind. + * @param request FetchGitAheadBehindRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchGitAheadBehindResponse + */ + public fetchGitAheadBehind(request: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, callback: google.cloud.dataform.v1alpha2.Dataform.FetchGitAheadBehindCallback): void; + + /** + * Calls FetchGitAheadBehind. + * @param request FetchGitAheadBehindRequest message or plain object + * @returns Promise + */ + public fetchGitAheadBehind(request: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest): Promise; + + /** + * Calls CommitWorkspaceChanges. + * @param request CommitWorkspaceChangesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public commitWorkspaceChanges(request: google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.CommitWorkspaceChangesCallback): void; + + /** + * Calls CommitWorkspaceChanges. + * @param request CommitWorkspaceChangesRequest message or plain object + * @returns Promise + */ + public commitWorkspaceChanges(request: google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest): Promise; + + /** + * Calls ResetWorkspaceChanges. + * @param request ResetWorkspaceChangesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public resetWorkspaceChanges(request: google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.ResetWorkspaceChangesCallback): void; + + /** + * Calls ResetWorkspaceChanges. + * @param request ResetWorkspaceChangesRequest message or plain object + * @returns Promise + */ + public resetWorkspaceChanges(request: google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest): Promise; + + /** + * Calls FetchFileDiff. + * @param request FetchFileDiffRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchFileDiffResponse + */ + public fetchFileDiff(request: google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, callback: google.cloud.dataform.v1alpha2.Dataform.FetchFileDiffCallback): void; + + /** + * Calls FetchFileDiff. + * @param request FetchFileDiffRequest message or plain object + * @returns Promise + */ + public fetchFileDiff(request: google.cloud.dataform.v1alpha2.IFetchFileDiffRequest): Promise; + + /** + * Calls QueryDirectoryContents. + * @param request QueryDirectoryContentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDirectoryContentsResponse + */ + public queryDirectoryContents(request: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.QueryDirectoryContentsCallback): void; + + /** + * Calls QueryDirectoryContents. + * @param request QueryDirectoryContentsRequest message or plain object + * @returns Promise + */ + public queryDirectoryContents(request: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest): Promise; + + /** + * Calls MakeDirectory. + * @param request MakeDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MakeDirectoryResponse + */ + public makeDirectory(request: google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.MakeDirectoryCallback): void; + + /** + * Calls MakeDirectory. + * @param request MakeDirectoryRequest message or plain object + * @returns Promise + */ + public makeDirectory(request: google.cloud.dataform.v1alpha2.IMakeDirectoryRequest): Promise; + + /** + * Calls RemoveDirectory. + * @param request RemoveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public removeDirectory(request: google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.RemoveDirectoryCallback): void; + + /** + * Calls RemoveDirectory. + * @param request RemoveDirectoryRequest message or plain object + * @returns Promise + */ + public removeDirectory(request: google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest): Promise; + + /** + * Calls MoveDirectory. + * @param request MoveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MoveDirectoryResponse + */ + public moveDirectory(request: google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.MoveDirectoryCallback): void; + + /** + * Calls MoveDirectory. + * @param request MoveDirectoryRequest message or plain object + * @returns Promise + */ + public moveDirectory(request: google.cloud.dataform.v1alpha2.IMoveDirectoryRequest): Promise; + + /** + * Calls ReadFile. + * @param request ReadFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadFileResponse + */ + public readFile(request: google.cloud.dataform.v1alpha2.IReadFileRequest, callback: google.cloud.dataform.v1alpha2.Dataform.ReadFileCallback): void; + + /** + * Calls ReadFile. + * @param request ReadFileRequest message or plain object + * @returns Promise + */ + public readFile(request: google.cloud.dataform.v1alpha2.IReadFileRequest): Promise; + + /** + * Calls RemoveFile. + * @param request RemoveFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public removeFile(request: google.cloud.dataform.v1alpha2.IRemoveFileRequest, callback: google.cloud.dataform.v1alpha2.Dataform.RemoveFileCallback): void; + + /** + * Calls RemoveFile. + * @param request RemoveFileRequest message or plain object + * @returns Promise + */ + public removeFile(request: google.cloud.dataform.v1alpha2.IRemoveFileRequest): Promise; + + /** + * Calls MoveFile. + * @param request MoveFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MoveFileResponse + */ + public moveFile(request: google.cloud.dataform.v1alpha2.IMoveFileRequest, callback: google.cloud.dataform.v1alpha2.Dataform.MoveFileCallback): void; + + /** + * Calls MoveFile. + * @param request MoveFileRequest message or plain object + * @returns Promise + */ + public moveFile(request: google.cloud.dataform.v1alpha2.IMoveFileRequest): Promise; + + /** + * Calls WriteFile. + * @param request WriteFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WriteFileResponse + */ + public writeFile(request: google.cloud.dataform.v1alpha2.IWriteFileRequest, callback: google.cloud.dataform.v1alpha2.Dataform.WriteFileCallback): void; + + /** + * Calls WriteFile. + * @param request WriteFileRequest message or plain object + * @returns Promise + */ + public writeFile(request: google.cloud.dataform.v1alpha2.IWriteFileRequest): Promise; + + /** + * Calls ListCompilationResults. + * @param request ListCompilationResultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCompilationResultsResponse + */ + public listCompilationResults(request: google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.ListCompilationResultsCallback): void; + + /** + * Calls ListCompilationResults. + * @param request ListCompilationResultsRequest message or plain object + * @returns Promise + */ + public listCompilationResults(request: google.cloud.dataform.v1alpha2.IListCompilationResultsRequest): Promise; + + /** + * Calls GetCompilationResult. + * @param request GetCompilationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompilationResult + */ + public getCompilationResult(request: google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, callback: google.cloud.dataform.v1alpha2.Dataform.GetCompilationResultCallback): void; + + /** + * Calls GetCompilationResult. + * @param request GetCompilationResultRequest message or plain object + * @returns Promise + */ + public getCompilationResult(request: google.cloud.dataform.v1alpha2.IGetCompilationResultRequest): Promise; + + /** + * Calls CreateCompilationResult. + * @param request CreateCompilationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompilationResult + */ + public createCompilationResult(request: google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, callback: google.cloud.dataform.v1alpha2.Dataform.CreateCompilationResultCallback): void; + + /** + * Calls CreateCompilationResult. + * @param request CreateCompilationResultRequest message or plain object + * @returns Promise + */ + public createCompilationResult(request: google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest): Promise; + + /** + * Calls QueryCompilationResultActions. + * @param request QueryCompilationResultActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryCompilationResultActionsResponse + */ + public queryCompilationResultActions(request: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.QueryCompilationResultActionsCallback): void; + + /** + * Calls QueryCompilationResultActions. + * @param request QueryCompilationResultActionsRequest message or plain object + * @returns Promise + */ + public queryCompilationResultActions(request: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest): Promise; + + /** + * Calls ListWorkflowInvocations. + * @param request ListWorkflowInvocationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkflowInvocationsResponse + */ + public listWorkflowInvocations(request: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.ListWorkflowInvocationsCallback): void; + + /** + * Calls ListWorkflowInvocations. + * @param request ListWorkflowInvocationsRequest message or plain object + * @returns Promise + */ + public listWorkflowInvocations(request: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest): Promise; + + /** + * Calls GetWorkflowInvocation. + * @param request GetWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkflowInvocation + */ + public getWorkflowInvocation(request: google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, callback: google.cloud.dataform.v1alpha2.Dataform.GetWorkflowInvocationCallback): void; + + /** + * Calls GetWorkflowInvocation. + * @param request GetWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public getWorkflowInvocation(request: google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest): Promise; + + /** + * Calls CreateWorkflowInvocation. + * @param request CreateWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkflowInvocation + */ + public createWorkflowInvocation(request: google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, callback: google.cloud.dataform.v1alpha2.Dataform.CreateWorkflowInvocationCallback): void; + + /** + * Calls CreateWorkflowInvocation. + * @param request CreateWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public createWorkflowInvocation(request: google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest): Promise; + + /** + * Calls DeleteWorkflowInvocation. + * @param request DeleteWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteWorkflowInvocation(request: google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, callback: google.cloud.dataform.v1alpha2.Dataform.DeleteWorkflowInvocationCallback): void; + + /** + * Calls DeleteWorkflowInvocation. + * @param request DeleteWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public deleteWorkflowInvocation(request: google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest): Promise; + + /** + * Calls CancelWorkflowInvocation. + * @param request CancelWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelWorkflowInvocation(request: google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, callback: google.cloud.dataform.v1alpha2.Dataform.CancelWorkflowInvocationCallback): void; + + /** + * Calls CancelWorkflowInvocation. + * @param request CancelWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public cancelWorkflowInvocation(request: google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest): Promise; + + /** + * Calls QueryWorkflowInvocationActions. + * @param request QueryWorkflowInvocationActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryWorkflowInvocationActionsResponse + */ + public queryWorkflowInvocationActions(request: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.QueryWorkflowInvocationActionsCallback): void; + + /** + * Calls QueryWorkflowInvocationActions. + * @param request QueryWorkflowInvocationActionsRequest message or plain object + * @returns Promise + */ + public queryWorkflowInvocationActions(request: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest): Promise; + } + + namespace Dataform { + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listRepositories}. + * @param error Error, if any + * @param [response] ListRepositoriesResponse + */ + type ListRepositoriesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ListRepositoriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type GetRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type CreateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|updateRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type UpdateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|deleteRepository}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteRepositoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchRemoteBranches}. + * @param error Error, if any + * @param [response] FetchRemoteBranchesResponse + */ + type FetchRemoteBranchesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listWorkspaces}. + * @param error Error, if any + * @param [response] ListWorkspacesResponse + */ + type ListWorkspacesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ListWorkspacesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getWorkspace}. + * @param error Error, if any + * @param [response] Workspace + */ + type GetWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Workspace) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createWorkspace}. + * @param error Error, if any + * @param [response] Workspace + */ + type CreateWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Workspace) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|deleteWorkspace}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteWorkspaceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|installNpmPackages}. + * @param error Error, if any + * @param [response] InstallNpmPackagesResponse + */ + type InstallNpmPackagesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|pullGitCommits}. + * @param error Error, if any + * @param [response] Empty + */ + type PullGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|pushGitCommits}. + * @param error Error, if any + * @param [response] Empty + */ + type PushGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchFileGitStatuses}. + * @param error Error, if any + * @param [response] FetchFileGitStatusesResponse + */ + type FetchFileGitStatusesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchGitAheadBehind}. + * @param error Error, if any + * @param [response] FetchGitAheadBehindResponse + */ + type FetchGitAheadBehindCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|commitWorkspaceChanges}. + * @param error Error, if any + * @param [response] Empty + */ + type CommitWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|resetWorkspaceChanges}. + * @param error Error, if any + * @param [response] Empty + */ + type ResetWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchFileDiff}. + * @param error Error, if any + * @param [response] FetchFileDiffResponse + */ + type FetchFileDiffCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.FetchFileDiffResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|queryDirectoryContents}. + * @param error Error, if any + * @param [response] QueryDirectoryContentsResponse + */ + type QueryDirectoryContentsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|makeDirectory}. + * @param error Error, if any + * @param [response] MakeDirectoryResponse + */ + type MakeDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.MakeDirectoryResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|removeDirectory}. + * @param error Error, if any + * @param [response] Empty + */ + type RemoveDirectoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|moveDirectory}. + * @param error Error, if any + * @param [response] MoveDirectoryResponse + */ + type MoveDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.MoveDirectoryResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|readFile}. + * @param error Error, if any + * @param [response] ReadFileResponse + */ + type ReadFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ReadFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|removeFile}. + * @param error Error, if any + * @param [response] Empty + */ + type RemoveFileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|moveFile}. + * @param error Error, if any + * @param [response] MoveFileResponse + */ + type MoveFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.MoveFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|writeFile}. + * @param error Error, if any + * @param [response] WriteFileResponse + */ + type WriteFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.WriteFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listCompilationResults}. + * @param error Error, if any + * @param [response] ListCompilationResultsResponse + */ + type ListCompilationResultsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ListCompilationResultsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getCompilationResult}. + * @param error Error, if any + * @param [response] CompilationResult + */ + type GetCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.CompilationResult) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createCompilationResult}. + * @param error Error, if any + * @param [response] CompilationResult + */ + type CreateCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.CompilationResult) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|queryCompilationResultActions}. + * @param error Error, if any + * @param [response] QueryCompilationResultActionsResponse + */ + type QueryCompilationResultActionsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listWorkflowInvocations}. + * @param error Error, if any + * @param [response] ListWorkflowInvocationsResponse + */ + type ListWorkflowInvocationsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getWorkflowInvocation}. + * @param error Error, if any + * @param [response] WorkflowInvocation + */ + type GetWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.WorkflowInvocation) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createWorkflowInvocation}. + * @param error Error, if any + * @param [response] WorkflowInvocation + */ + type CreateWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.WorkflowInvocation) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|deleteWorkflowInvocation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|cancelWorkflowInvocation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|queryWorkflowInvocationActions}. + * @param error Error, if any + * @param [response] QueryWorkflowInvocationActionsResponse + */ + type QueryWorkflowInvocationActionsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse) => void; + } + + /** Properties of a Repository. */ + interface IRepository { + + /** Repository name */ + name?: (string|null); + + /** Repository gitRemoteSettings */ + gitRemoteSettings?: (google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings|null); + } + + /** Represents a Repository. */ + class Repository implements IRepository { + + /** + * Constructs a new Repository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IRepository); + + /** Repository name. */ + public name: string; + + /** Repository gitRemoteSettings. */ + public gitRemoteSettings?: (google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings|null); + + /** + * Creates a new Repository instance using the specified properties. + * @param [properties] Properties to set + * @returns Repository instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IRepository): google.cloud.dataform.v1alpha2.Repository; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.Repository; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.Repository; + + /** + * Verifies a Repository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Repository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.Repository; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @param message Repository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Repository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Repository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Repository { + + /** Properties of a GitRemoteSettings. */ + interface IGitRemoteSettings { + + /** GitRemoteSettings url */ + url?: (string|null); + + /** GitRemoteSettings defaultBranch */ + defaultBranch?: (string|null); + + /** GitRemoteSettings authenticationTokenSecretVersion */ + authenticationTokenSecretVersion?: (string|null); + + /** GitRemoteSettings tokenStatus */ + tokenStatus?: (google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus|keyof typeof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus|null); + } + + /** Represents a GitRemoteSettings. */ + class GitRemoteSettings implements IGitRemoteSettings { + + /** + * Constructs a new GitRemoteSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings); + + /** GitRemoteSettings url. */ + public url: string; + + /** GitRemoteSettings defaultBranch. */ + public defaultBranch: string; + + /** GitRemoteSettings authenticationTokenSecretVersion. */ + public authenticationTokenSecretVersion: string; + + /** GitRemoteSettings tokenStatus. */ + public tokenStatus: (google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus|keyof typeof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus); + + /** + * Creates a new GitRemoteSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GitRemoteSettings instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings): google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings; + + /** + * Encodes the specified GitRemoteSettings message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.verify|verify} messages. + * @param message GitRemoteSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GitRemoteSettings message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.verify|verify} messages. + * @param message GitRemoteSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings; + + /** + * Verifies a GitRemoteSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GitRemoteSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GitRemoteSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings; + + /** + * Creates a plain object from a GitRemoteSettings message. Also converts values to other types if specified. + * @param message GitRemoteSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GitRemoteSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GitRemoteSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GitRemoteSettings { + + /** TokenStatus enum. */ + enum TokenStatus { + TOKEN_STATUS_UNSPECIFIED = 0, + NOT_FOUND = 1, + INVALID = 2, + VALID = 3 + } + } + } + + /** Properties of a ListRepositoriesRequest. */ + interface IListRepositoriesRequest { + + /** ListRepositoriesRequest parent */ + parent?: (string|null); + + /** ListRepositoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListRepositoriesRequest pageToken */ + pageToken?: (string|null); + + /** ListRepositoriesRequest orderBy */ + orderBy?: (string|null); + + /** ListRepositoriesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListRepositoriesRequest. */ + class ListRepositoriesRequest implements IListRepositoriesRequest { + + /** + * Constructs a new ListRepositoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListRepositoriesRequest); + + /** ListRepositoriesRequest parent. */ + public parent: string; + + /** ListRepositoriesRequest pageSize. */ + public pageSize: number; + + /** ListRepositoriesRequest pageToken. */ + public pageToken: string; + + /** ListRepositoriesRequest orderBy. */ + public orderBy: string; + + /** ListRepositoriesRequest filter. */ + public filter: string; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListRepositoriesRequest): google.cloud.dataform.v1alpha2.ListRepositoriesRequest; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListRepositoriesRequest; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListRepositoriesRequest; + + /** + * Verifies a ListRepositoriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListRepositoriesRequest; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @param message ListRepositoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRepositoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRepositoriesResponse. */ + interface IListRepositoriesResponse { + + /** ListRepositoriesResponse repositories */ + repositories?: (google.cloud.dataform.v1alpha2.IRepository[]|null); + + /** ListRepositoriesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListRepositoriesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListRepositoriesResponse. */ + class ListRepositoriesResponse implements IListRepositoriesResponse { + + /** + * Constructs a new ListRepositoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListRepositoriesResponse); + + /** ListRepositoriesResponse repositories. */ + public repositories: google.cloud.dataform.v1alpha2.IRepository[]; + + /** ListRepositoriesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListRepositoriesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListRepositoriesResponse): google.cloud.dataform.v1alpha2.ListRepositoriesResponse; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListRepositoriesResponse; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListRepositoriesResponse; + + /** + * Verifies a ListRepositoriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListRepositoriesResponse; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @param message ListRepositoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRepositoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetRepositoryRequest. */ + interface IGetRepositoryRequest { + + /** GetRepositoryRequest name */ + name?: (string|null); + } + + /** Represents a GetRepositoryRequest. */ + class GetRepositoryRequest implements IGetRepositoryRequest { + + /** + * Constructs a new GetRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IGetRepositoryRequest); + + /** GetRepositoryRequest name. */ + public name: string; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IGetRepositoryRequest): google.cloud.dataform.v1alpha2.GetRepositoryRequest; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.GetRepositoryRequest; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.GetRepositoryRequest; + + /** + * Verifies a GetRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.GetRepositoryRequest; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @param message GetRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.GetRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateRepositoryRequest. */ + interface ICreateRepositoryRequest { + + /** CreateRepositoryRequest parent */ + parent?: (string|null); + + /** CreateRepositoryRequest repository */ + repository?: (google.cloud.dataform.v1alpha2.IRepository|null); + + /** CreateRepositoryRequest repositoryId */ + repositoryId?: (string|null); + } + + /** Represents a CreateRepositoryRequest. */ + class CreateRepositoryRequest implements ICreateRepositoryRequest { + + /** + * Constructs a new CreateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICreateRepositoryRequest); + + /** CreateRepositoryRequest parent. */ + public parent: string; + + /** CreateRepositoryRequest repository. */ + public repository?: (google.cloud.dataform.v1alpha2.IRepository|null); + + /** CreateRepositoryRequest repositoryId. */ + public repositoryId: string; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICreateRepositoryRequest): google.cloud.dataform.v1alpha2.CreateRepositoryRequest; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CreateRepositoryRequest; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CreateRepositoryRequest; + + /** + * Verifies a CreateRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CreateRepositoryRequest; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @param message CreateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CreateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateRepositoryRequest. */ + interface IUpdateRepositoryRequest { + + /** UpdateRepositoryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateRepositoryRequest repository */ + repository?: (google.cloud.dataform.v1alpha2.IRepository|null); + } + + /** Represents an UpdateRepositoryRequest. */ + class UpdateRepositoryRequest implements IUpdateRepositoryRequest { + + /** + * Constructs a new UpdateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest); + + /** UpdateRepositoryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateRepositoryRequest repository. */ + public repository?: (google.cloud.dataform.v1alpha2.IRepository|null); + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest): google.cloud.dataform.v1alpha2.UpdateRepositoryRequest; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.UpdateRepositoryRequest; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.UpdateRepositoryRequest; + + /** + * Verifies an UpdateRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.UpdateRepositoryRequest; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @param message UpdateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.UpdateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteRepositoryRequest. */ + interface IDeleteRepositoryRequest { + + /** DeleteRepositoryRequest name */ + name?: (string|null); + + /** DeleteRepositoryRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteRepositoryRequest. */ + class DeleteRepositoryRequest implements IDeleteRepositoryRequest { + + /** + * Constructs a new DeleteRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest); + + /** DeleteRepositoryRequest name. */ + public name: string; + + /** DeleteRepositoryRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest): google.cloud.dataform.v1alpha2.DeleteRepositoryRequest; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.DeleteRepositoryRequest; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.DeleteRepositoryRequest; + + /** + * Verifies a DeleteRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.DeleteRepositoryRequest; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @param message DeleteRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.DeleteRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchRemoteBranchesRequest. */ + interface IFetchRemoteBranchesRequest { + + /** FetchRemoteBranchesRequest name */ + name?: (string|null); + } + + /** Represents a FetchRemoteBranchesRequest. */ + class FetchRemoteBranchesRequest implements IFetchRemoteBranchesRequest { + + /** + * Constructs a new FetchRemoteBranchesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest); + + /** FetchRemoteBranchesRequest name. */ + public name: string; + + /** + * Creates a new FetchRemoteBranchesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchRemoteBranchesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest): google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest; + + /** + * Encodes the specified FetchRemoteBranchesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest.verify|verify} messages. + * @param message FetchRemoteBranchesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchRemoteBranchesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest.verify|verify} messages. + * @param message FetchRemoteBranchesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest; + + /** + * Verifies a FetchRemoteBranchesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchRemoteBranchesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchRemoteBranchesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest; + + /** + * Creates a plain object from a FetchRemoteBranchesRequest message. Also converts values to other types if specified. + * @param message FetchRemoteBranchesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchRemoteBranchesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchRemoteBranchesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchRemoteBranchesResponse. */ + interface IFetchRemoteBranchesResponse { + + /** FetchRemoteBranchesResponse branches */ + branches?: (string[]|null); + } + + /** Represents a FetchRemoteBranchesResponse. */ + class FetchRemoteBranchesResponse implements IFetchRemoteBranchesResponse { + + /** + * Constructs a new FetchRemoteBranchesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse); + + /** FetchRemoteBranchesResponse branches. */ + public branches: string[]; + + /** + * Creates a new FetchRemoteBranchesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchRemoteBranchesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse): google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse; + + /** + * Encodes the specified FetchRemoteBranchesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse.verify|verify} messages. + * @param message FetchRemoteBranchesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchRemoteBranchesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse.verify|verify} messages. + * @param message FetchRemoteBranchesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse; + + /** + * Verifies a FetchRemoteBranchesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchRemoteBranchesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchRemoteBranchesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse; + + /** + * Creates a plain object from a FetchRemoteBranchesResponse message. Also converts values to other types if specified. + * @param message FetchRemoteBranchesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchRemoteBranchesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchRemoteBranchesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Workspace. */ + interface IWorkspace { + + /** Workspace name */ + name?: (string|null); + } + + /** Represents a Workspace. */ + class Workspace implements IWorkspace { + + /** + * Constructs a new Workspace. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IWorkspace); + + /** Workspace name. */ + public name: string; + + /** + * Creates a new Workspace instance using the specified properties. + * @param [properties] Properties to set + * @returns Workspace instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IWorkspace): google.cloud.dataform.v1alpha2.Workspace; + + /** + * Encodes the specified Workspace message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Workspace.verify|verify} messages. + * @param message Workspace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IWorkspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Workspace message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Workspace.verify|verify} messages. + * @param message Workspace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IWorkspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Workspace message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.Workspace; + + /** + * Decodes a Workspace message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.Workspace; + + /** + * Verifies a Workspace message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Workspace message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Workspace + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.Workspace; + + /** + * Creates a plain object from a Workspace message. Also converts values to other types if specified. + * @param message Workspace + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.Workspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Workspace to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Workspace + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListWorkspacesRequest. */ + interface IListWorkspacesRequest { + + /** ListWorkspacesRequest parent */ + parent?: (string|null); + + /** ListWorkspacesRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkspacesRequest pageToken */ + pageToken?: (string|null); + + /** ListWorkspacesRequest orderBy */ + orderBy?: (string|null); + + /** ListWorkspacesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListWorkspacesRequest. */ + class ListWorkspacesRequest implements IListWorkspacesRequest { + + /** + * Constructs a new ListWorkspacesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListWorkspacesRequest); + + /** ListWorkspacesRequest parent. */ + public parent: string; + + /** ListWorkspacesRequest pageSize. */ + public pageSize: number; + + /** ListWorkspacesRequest pageToken. */ + public pageToken: string; + + /** ListWorkspacesRequest orderBy. */ + public orderBy: string; + + /** ListWorkspacesRequest filter. */ + public filter: string; + + /** + * Creates a new ListWorkspacesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkspacesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListWorkspacesRequest): google.cloud.dataform.v1alpha2.ListWorkspacesRequest; + + /** + * Encodes the specified ListWorkspacesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesRequest.verify|verify} messages. + * @param message ListWorkspacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListWorkspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkspacesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesRequest.verify|verify} messages. + * @param message ListWorkspacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListWorkspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListWorkspacesRequest; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListWorkspacesRequest; + + /** + * Verifies a ListWorkspacesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkspacesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkspacesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListWorkspacesRequest; + + /** + * Creates a plain object from a ListWorkspacesRequest message. Also converts values to other types if specified. + * @param message ListWorkspacesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListWorkspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkspacesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkspacesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListWorkspacesResponse. */ + interface IListWorkspacesResponse { + + /** ListWorkspacesResponse workspaces */ + workspaces?: (google.cloud.dataform.v1alpha2.IWorkspace[]|null); + + /** ListWorkspacesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListWorkspacesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListWorkspacesResponse. */ + class ListWorkspacesResponse implements IListWorkspacesResponse { + + /** + * Constructs a new ListWorkspacesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListWorkspacesResponse); + + /** ListWorkspacesResponse workspaces. */ + public workspaces: google.cloud.dataform.v1alpha2.IWorkspace[]; + + /** ListWorkspacesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListWorkspacesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListWorkspacesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkspacesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListWorkspacesResponse): google.cloud.dataform.v1alpha2.ListWorkspacesResponse; + + /** + * Encodes the specified ListWorkspacesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesResponse.verify|verify} messages. + * @param message ListWorkspacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListWorkspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkspacesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesResponse.verify|verify} messages. + * @param message ListWorkspacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListWorkspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListWorkspacesResponse; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListWorkspacesResponse; + + /** + * Verifies a ListWorkspacesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkspacesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkspacesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListWorkspacesResponse; + + /** + * Creates a plain object from a ListWorkspacesResponse message. Also converts values to other types if specified. + * @param message ListWorkspacesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListWorkspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkspacesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkspacesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetWorkspaceRequest. */ + interface IGetWorkspaceRequest { + + /** GetWorkspaceRequest name */ + name?: (string|null); + } + + /** Represents a GetWorkspaceRequest. */ + class GetWorkspaceRequest implements IGetWorkspaceRequest { + + /** + * Constructs a new GetWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IGetWorkspaceRequest); + + /** GetWorkspaceRequest name. */ + public name: string; + + /** + * Creates a new GetWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IGetWorkspaceRequest): google.cloud.dataform.v1alpha2.GetWorkspaceRequest; + + /** + * Encodes the specified GetWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkspaceRequest.verify|verify} messages. + * @param message GetWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkspaceRequest.verify|verify} messages. + * @param message GetWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.GetWorkspaceRequest; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.GetWorkspaceRequest; + + /** + * Verifies a GetWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.GetWorkspaceRequest; + + /** + * Creates a plain object from a GetWorkspaceRequest message. Also converts values to other types if specified. + * @param message GetWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.GetWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateWorkspaceRequest. */ + interface ICreateWorkspaceRequest { + + /** CreateWorkspaceRequest parent */ + parent?: (string|null); + + /** CreateWorkspaceRequest workspace */ + workspace?: (google.cloud.dataform.v1alpha2.IWorkspace|null); + + /** CreateWorkspaceRequest workspaceId */ + workspaceId?: (string|null); + } + + /** Represents a CreateWorkspaceRequest. */ + class CreateWorkspaceRequest implements ICreateWorkspaceRequest { + + /** + * Constructs a new CreateWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest); + + /** CreateWorkspaceRequest parent. */ + public parent: string; + + /** CreateWorkspaceRequest workspace. */ + public workspace?: (google.cloud.dataform.v1alpha2.IWorkspace|null); + + /** CreateWorkspaceRequest workspaceId. */ + public workspaceId: string; + + /** + * Creates a new CreateWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest): google.cloud.dataform.v1alpha2.CreateWorkspaceRequest; + + /** + * Encodes the specified CreateWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkspaceRequest.verify|verify} messages. + * @param message CreateWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkspaceRequest.verify|verify} messages. + * @param message CreateWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CreateWorkspaceRequest; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CreateWorkspaceRequest; + + /** + * Verifies a CreateWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CreateWorkspaceRequest; + + /** + * Creates a plain object from a CreateWorkspaceRequest message. Also converts values to other types if specified. + * @param message CreateWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CreateWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteWorkspaceRequest. */ + interface IDeleteWorkspaceRequest { + + /** DeleteWorkspaceRequest name */ + name?: (string|null); + } + + /** Represents a DeleteWorkspaceRequest. */ + class DeleteWorkspaceRequest implements IDeleteWorkspaceRequest { + + /** + * Constructs a new DeleteWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest); + + /** DeleteWorkspaceRequest name. */ + public name: string; + + /** + * Creates a new DeleteWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest): google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest; + + /** + * Encodes the specified DeleteWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest.verify|verify} messages. + * @param message DeleteWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest.verify|verify} messages. + * @param message DeleteWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest; + + /** + * Verifies a DeleteWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest; + + /** + * Creates a plain object from a DeleteWorkspaceRequest message. Also converts values to other types if specified. + * @param message DeleteWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommitAuthor. */ + interface ICommitAuthor { + + /** CommitAuthor name */ + name?: (string|null); + + /** CommitAuthor emailAddress */ + emailAddress?: (string|null); + } + + /** Represents a CommitAuthor. */ + class CommitAuthor implements ICommitAuthor { + + /** + * Constructs a new CommitAuthor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICommitAuthor); + + /** CommitAuthor name. */ + public name: string; + + /** CommitAuthor emailAddress. */ + public emailAddress: string; + + /** + * Creates a new CommitAuthor instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitAuthor instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICommitAuthor): google.cloud.dataform.v1alpha2.CommitAuthor; + + /** + * Encodes the specified CommitAuthor message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitAuthor.verify|verify} messages. + * @param message CommitAuthor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICommitAuthor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommitAuthor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitAuthor.verify|verify} messages. + * @param message CommitAuthor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICommitAuthor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CommitAuthor; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CommitAuthor; + + /** + * Verifies a CommitAuthor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommitAuthor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommitAuthor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CommitAuthor; + + /** + * Creates a plain object from a CommitAuthor message. Also converts values to other types if specified. + * @param message CommitAuthor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CommitAuthor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommitAuthor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommitAuthor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PullGitCommitsRequest. */ + interface IPullGitCommitsRequest { + + /** PullGitCommitsRequest name */ + name?: (string|null); + + /** PullGitCommitsRequest remoteBranch */ + remoteBranch?: (string|null); + + /** PullGitCommitsRequest author */ + author?: (google.cloud.dataform.v1alpha2.ICommitAuthor|null); + } + + /** Represents a PullGitCommitsRequest. */ + class PullGitCommitsRequest implements IPullGitCommitsRequest { + + /** + * Constructs a new PullGitCommitsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IPullGitCommitsRequest); + + /** PullGitCommitsRequest name. */ + public name: string; + + /** PullGitCommitsRequest remoteBranch. */ + public remoteBranch: string; + + /** PullGitCommitsRequest author. */ + public author?: (google.cloud.dataform.v1alpha2.ICommitAuthor|null); + + /** + * Creates a new PullGitCommitsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PullGitCommitsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IPullGitCommitsRequest): google.cloud.dataform.v1alpha2.PullGitCommitsRequest; + + /** + * Encodes the specified PullGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.PullGitCommitsRequest.verify|verify} messages. + * @param message PullGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.PullGitCommitsRequest.verify|verify} messages. + * @param message PullGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.PullGitCommitsRequest; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.PullGitCommitsRequest; + + /** + * Verifies a PullGitCommitsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PullGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullGitCommitsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.PullGitCommitsRequest; + + /** + * Creates a plain object from a PullGitCommitsRequest message. Also converts values to other types if specified. + * @param message PullGitCommitsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.PullGitCommitsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullGitCommitsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PullGitCommitsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PushGitCommitsRequest. */ + interface IPushGitCommitsRequest { + + /** PushGitCommitsRequest name */ + name?: (string|null); + + /** PushGitCommitsRequest remoteBranch */ + remoteBranch?: (string|null); + } + + /** Represents a PushGitCommitsRequest. */ + class PushGitCommitsRequest implements IPushGitCommitsRequest { + + /** + * Constructs a new PushGitCommitsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IPushGitCommitsRequest); + + /** PushGitCommitsRequest name. */ + public name: string; + + /** PushGitCommitsRequest remoteBranch. */ + public remoteBranch: string; + + /** + * Creates a new PushGitCommitsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PushGitCommitsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IPushGitCommitsRequest): google.cloud.dataform.v1alpha2.PushGitCommitsRequest; + + /** + * Encodes the specified PushGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.PushGitCommitsRequest.verify|verify} messages. + * @param message PushGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.PushGitCommitsRequest.verify|verify} messages. + * @param message PushGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.PushGitCommitsRequest; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.PushGitCommitsRequest; + + /** + * Verifies a PushGitCommitsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PushGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushGitCommitsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.PushGitCommitsRequest; + + /** + * Creates a plain object from a PushGitCommitsRequest message. Also converts values to other types if specified. + * @param message PushGitCommitsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.PushGitCommitsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushGitCommitsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PushGitCommitsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchFileGitStatusesRequest. */ + interface IFetchFileGitStatusesRequest { + + /** FetchFileGitStatusesRequest name */ + name?: (string|null); + } + + /** Represents a FetchFileGitStatusesRequest. */ + class FetchFileGitStatusesRequest implements IFetchFileGitStatusesRequest { + + /** + * Constructs a new FetchFileGitStatusesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest); + + /** FetchFileGitStatusesRequest name. */ + public name: string; + + /** + * Creates a new FetchFileGitStatusesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileGitStatusesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest): google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest; + + /** + * Encodes the specified FetchFileGitStatusesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest.verify|verify} messages. + * @param message FetchFileGitStatusesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileGitStatusesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest.verify|verify} messages. + * @param message FetchFileGitStatusesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest; + + /** + * Verifies a FetchFileGitStatusesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileGitStatusesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileGitStatusesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest; + + /** + * Creates a plain object from a FetchFileGitStatusesRequest message. Also converts values to other types if specified. + * @param message FetchFileGitStatusesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileGitStatusesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileGitStatusesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchFileGitStatusesResponse. */ + interface IFetchFileGitStatusesResponse { + + /** FetchFileGitStatusesResponse uncommittedFileChanges */ + uncommittedFileChanges?: (google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange[]|null); + } + + /** Represents a FetchFileGitStatusesResponse. */ + class FetchFileGitStatusesResponse implements IFetchFileGitStatusesResponse { + + /** + * Constructs a new FetchFileGitStatusesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse); + + /** FetchFileGitStatusesResponse uncommittedFileChanges. */ + public uncommittedFileChanges: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange[]; + + /** + * Creates a new FetchFileGitStatusesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileGitStatusesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse; + + /** + * Encodes the specified FetchFileGitStatusesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.verify|verify} messages. + * @param message FetchFileGitStatusesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileGitStatusesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.verify|verify} messages. + * @param message FetchFileGitStatusesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse; + + /** + * Verifies a FetchFileGitStatusesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileGitStatusesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileGitStatusesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse; + + /** + * Creates a plain object from a FetchFileGitStatusesResponse message. Also converts values to other types if specified. + * @param message FetchFileGitStatusesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileGitStatusesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileGitStatusesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FetchFileGitStatusesResponse { + + /** Properties of an UncommittedFileChange. */ + interface IUncommittedFileChange { + + /** UncommittedFileChange path */ + path?: (string|null); + + /** UncommittedFileChange state */ + state?: (google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State|keyof typeof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State|null); + } + + /** Represents an UncommittedFileChange. */ + class UncommittedFileChange implements IUncommittedFileChange { + + /** + * Constructs a new UncommittedFileChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange); + + /** UncommittedFileChange path. */ + public path: string; + + /** UncommittedFileChange state. */ + public state: (google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State|keyof typeof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State); + + /** + * Creates a new UncommittedFileChange instance using the specified properties. + * @param [properties] Properties to set + * @returns UncommittedFileChange instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Encodes the specified UncommittedFileChange message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @param message UncommittedFileChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UncommittedFileChange message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @param message UncommittedFileChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Verifies an UncommittedFileChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UncommittedFileChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UncommittedFileChange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Creates a plain object from an UncommittedFileChange message. Also converts values to other types if specified. + * @param message UncommittedFileChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UncommittedFileChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UncommittedFileChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UncommittedFileChange { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ADDED = 1, + DELETED = 2, + MODIFIED = 3, + HAS_CONFLICTS = 4 + } + } + } + + /** Properties of a FetchGitAheadBehindRequest. */ + interface IFetchGitAheadBehindRequest { + + /** FetchGitAheadBehindRequest name */ + name?: (string|null); + + /** FetchGitAheadBehindRequest remoteBranch */ + remoteBranch?: (string|null); + } + + /** Represents a FetchGitAheadBehindRequest. */ + class FetchGitAheadBehindRequest implements IFetchGitAheadBehindRequest { + + /** + * Constructs a new FetchGitAheadBehindRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest); + + /** FetchGitAheadBehindRequest name. */ + public name: string; + + /** FetchGitAheadBehindRequest remoteBranch. */ + public remoteBranch: string; + + /** + * Creates a new FetchGitAheadBehindRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchGitAheadBehindRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest): google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest; + + /** + * Encodes the specified FetchGitAheadBehindRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest.verify|verify} messages. + * @param message FetchGitAheadBehindRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchGitAheadBehindRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest.verify|verify} messages. + * @param message FetchGitAheadBehindRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest; + + /** + * Verifies a FetchGitAheadBehindRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchGitAheadBehindRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchGitAheadBehindRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest; + + /** + * Creates a plain object from a FetchGitAheadBehindRequest message. Also converts values to other types if specified. + * @param message FetchGitAheadBehindRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchGitAheadBehindRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchGitAheadBehindRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchGitAheadBehindResponse. */ + interface IFetchGitAheadBehindResponse { + + /** FetchGitAheadBehindResponse commitsAhead */ + commitsAhead?: (number|null); + + /** FetchGitAheadBehindResponse commitsBehind */ + commitsBehind?: (number|null); + } + + /** Represents a FetchGitAheadBehindResponse. */ + class FetchGitAheadBehindResponse implements IFetchGitAheadBehindResponse { + + /** + * Constructs a new FetchGitAheadBehindResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse); + + /** FetchGitAheadBehindResponse commitsAhead. */ + public commitsAhead: number; + + /** FetchGitAheadBehindResponse commitsBehind. */ + public commitsBehind: number; + + /** + * Creates a new FetchGitAheadBehindResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchGitAheadBehindResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse): google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse; + + /** + * Encodes the specified FetchGitAheadBehindResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse.verify|verify} messages. + * @param message FetchGitAheadBehindResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchGitAheadBehindResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse.verify|verify} messages. + * @param message FetchGitAheadBehindResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse; + + /** + * Verifies a FetchGitAheadBehindResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchGitAheadBehindResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchGitAheadBehindResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse; + + /** + * Creates a plain object from a FetchGitAheadBehindResponse message. Also converts values to other types if specified. + * @param message FetchGitAheadBehindResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchGitAheadBehindResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchGitAheadBehindResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommitWorkspaceChangesRequest. */ + interface ICommitWorkspaceChangesRequest { + + /** CommitWorkspaceChangesRequest name */ + name?: (string|null); + + /** CommitWorkspaceChangesRequest author */ + author?: (google.cloud.dataform.v1alpha2.ICommitAuthor|null); + + /** CommitWorkspaceChangesRequest commitMessage */ + commitMessage?: (string|null); + + /** CommitWorkspaceChangesRequest paths */ + paths?: (string[]|null); + } + + /** Represents a CommitWorkspaceChangesRequest. */ + class CommitWorkspaceChangesRequest implements ICommitWorkspaceChangesRequest { + + /** + * Constructs a new CommitWorkspaceChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest); + + /** CommitWorkspaceChangesRequest name. */ + public name: string; + + /** CommitWorkspaceChangesRequest author. */ + public author?: (google.cloud.dataform.v1alpha2.ICommitAuthor|null); + + /** CommitWorkspaceChangesRequest commitMessage. */ + public commitMessage: string; + + /** CommitWorkspaceChangesRequest paths. */ + public paths: string[]; + + /** + * Creates a new CommitWorkspaceChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitWorkspaceChangesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest): google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.verify|verify} messages. + * @param message CommitWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.verify|verify} messages. + * @param message CommitWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest; + + /** + * Verifies a CommitWorkspaceChangesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommitWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommitWorkspaceChangesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest; + + /** + * Creates a plain object from a CommitWorkspaceChangesRequest message. Also converts values to other types if specified. + * @param message CommitWorkspaceChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommitWorkspaceChangesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommitWorkspaceChangesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResetWorkspaceChangesRequest. */ + interface IResetWorkspaceChangesRequest { + + /** ResetWorkspaceChangesRequest name */ + name?: (string|null); + + /** ResetWorkspaceChangesRequest paths */ + paths?: (string[]|null); + + /** ResetWorkspaceChangesRequest clean */ + clean?: (boolean|null); + } + + /** Represents a ResetWorkspaceChangesRequest. */ + class ResetWorkspaceChangesRequest implements IResetWorkspaceChangesRequest { + + /** + * Constructs a new ResetWorkspaceChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest); + + /** ResetWorkspaceChangesRequest name. */ + public name: string; + + /** ResetWorkspaceChangesRequest paths. */ + public paths: string[]; + + /** ResetWorkspaceChangesRequest clean. */ + public clean: boolean; + + /** + * Creates a new ResetWorkspaceChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetWorkspaceChangesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest): google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest.verify|verify} messages. + * @param message ResetWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest.verify|verify} messages. + * @param message ResetWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest; + + /** + * Verifies a ResetWorkspaceChangesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResetWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetWorkspaceChangesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest; + + /** + * Creates a plain object from a ResetWorkspaceChangesRequest message. Also converts values to other types if specified. + * @param message ResetWorkspaceChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResetWorkspaceChangesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResetWorkspaceChangesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchFileDiffRequest. */ + interface IFetchFileDiffRequest { + + /** FetchFileDiffRequest workspace */ + workspace?: (string|null); + + /** FetchFileDiffRequest path */ + path?: (string|null); + } + + /** Represents a FetchFileDiffRequest. */ + class FetchFileDiffRequest implements IFetchFileDiffRequest { + + /** + * Constructs a new FetchFileDiffRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchFileDiffRequest); + + /** FetchFileDiffRequest workspace. */ + public workspace: string; + + /** FetchFileDiffRequest path. */ + public path: string; + + /** + * Creates a new FetchFileDiffRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileDiffRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchFileDiffRequest): google.cloud.dataform.v1alpha2.FetchFileDiffRequest; + + /** + * Encodes the specified FetchFileDiffRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffRequest.verify|verify} messages. + * @param message FetchFileDiffRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileDiffRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffRequest.verify|verify} messages. + * @param message FetchFileDiffRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchFileDiffRequest; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchFileDiffRequest; + + /** + * Verifies a FetchFileDiffRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileDiffRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileDiffRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchFileDiffRequest; + + /** + * Creates a plain object from a FetchFileDiffRequest message. Also converts values to other types if specified. + * @param message FetchFileDiffRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchFileDiffRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileDiffRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileDiffRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchFileDiffResponse. */ + interface IFetchFileDiffResponse { + + /** FetchFileDiffResponse formattedDiff */ + formattedDiff?: (string|null); + } + + /** Represents a FetchFileDiffResponse. */ + class FetchFileDiffResponse implements IFetchFileDiffResponse { + + /** + * Constructs a new FetchFileDiffResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchFileDiffResponse); + + /** FetchFileDiffResponse formattedDiff. */ + public formattedDiff: string; + + /** + * Creates a new FetchFileDiffResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileDiffResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchFileDiffResponse): google.cloud.dataform.v1alpha2.FetchFileDiffResponse; + + /** + * Encodes the specified FetchFileDiffResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffResponse.verify|verify} messages. + * @param message FetchFileDiffResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileDiffResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffResponse.verify|verify} messages. + * @param message FetchFileDiffResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchFileDiffResponse; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchFileDiffResponse; + + /** + * Verifies a FetchFileDiffResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileDiffResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileDiffResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchFileDiffResponse; + + /** + * Creates a plain object from a FetchFileDiffResponse message. Also converts values to other types if specified. + * @param message FetchFileDiffResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchFileDiffResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileDiffResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileDiffResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryDirectoryContentsRequest. */ + interface IQueryDirectoryContentsRequest { + + /** QueryDirectoryContentsRequest workspace */ + workspace?: (string|null); + + /** QueryDirectoryContentsRequest path */ + path?: (string|null); + + /** QueryDirectoryContentsRequest pageSize */ + pageSize?: (number|null); + + /** QueryDirectoryContentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a QueryDirectoryContentsRequest. */ + class QueryDirectoryContentsRequest implements IQueryDirectoryContentsRequest { + + /** + * Constructs a new QueryDirectoryContentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest); + + /** QueryDirectoryContentsRequest workspace. */ + public workspace: string; + + /** QueryDirectoryContentsRequest path. */ + public path: string; + + /** QueryDirectoryContentsRequest pageSize. */ + public pageSize: number; + + /** QueryDirectoryContentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new QueryDirectoryContentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDirectoryContentsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest): google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest; + + /** + * Encodes the specified QueryDirectoryContentsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest.verify|verify} messages. + * @param message QueryDirectoryContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDirectoryContentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest.verify|verify} messages. + * @param message QueryDirectoryContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest; + + /** + * Verifies a QueryDirectoryContentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDirectoryContentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDirectoryContentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest; + + /** + * Creates a plain object from a QueryDirectoryContentsRequest message. Also converts values to other types if specified. + * @param message QueryDirectoryContentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDirectoryContentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryDirectoryContentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryDirectoryContentsResponse. */ + interface IQueryDirectoryContentsResponse { + + /** QueryDirectoryContentsResponse directoryEntries */ + directoryEntries?: (google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[]|null); + + /** QueryDirectoryContentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryDirectoryContentsResponse. */ + class QueryDirectoryContentsResponse implements IQueryDirectoryContentsResponse { + + /** + * Constructs a new QueryDirectoryContentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse); + + /** QueryDirectoryContentsResponse directoryEntries. */ + public directoryEntries: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[]; + + /** QueryDirectoryContentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryDirectoryContentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDirectoryContentsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse; + + /** + * Encodes the specified QueryDirectoryContentsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.verify|verify} messages. + * @param message QueryDirectoryContentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDirectoryContentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.verify|verify} messages. + * @param message QueryDirectoryContentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse; + + /** + * Verifies a QueryDirectoryContentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDirectoryContentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDirectoryContentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse; + + /** + * Creates a plain object from a QueryDirectoryContentsResponse message. Also converts values to other types if specified. + * @param message QueryDirectoryContentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDirectoryContentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryDirectoryContentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QueryDirectoryContentsResponse { + + /** Properties of a DirectoryEntry. */ + interface IDirectoryEntry { + + /** DirectoryEntry file */ + file?: (string|null); + + /** DirectoryEntry directory */ + directory?: (string|null); + } + + /** Represents a DirectoryEntry. */ + class DirectoryEntry implements IDirectoryEntry { + + /** + * Constructs a new DirectoryEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry); + + /** DirectoryEntry file. */ + public file?: (string|null); + + /** DirectoryEntry directory. */ + public directory?: (string|null); + + /** DirectoryEntry entry. */ + public entry?: ("file"|"directory"); + + /** + * Creates a new DirectoryEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns DirectoryEntry instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Encodes the specified DirectoryEntry message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @param message DirectoryEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DirectoryEntry message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @param message DirectoryEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Verifies a DirectoryEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DirectoryEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DirectoryEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Creates a plain object from a DirectoryEntry message. Also converts values to other types if specified. + * @param message DirectoryEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DirectoryEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DirectoryEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a MakeDirectoryRequest. */ + interface IMakeDirectoryRequest { + + /** MakeDirectoryRequest workspace */ + workspace?: (string|null); + + /** MakeDirectoryRequest path */ + path?: (string|null); + } + + /** Represents a MakeDirectoryRequest. */ + class MakeDirectoryRequest implements IMakeDirectoryRequest { + + /** + * Constructs a new MakeDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IMakeDirectoryRequest); + + /** MakeDirectoryRequest workspace. */ + public workspace: string; + + /** MakeDirectoryRequest path. */ + public path: string; + + /** + * Creates a new MakeDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MakeDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IMakeDirectoryRequest): google.cloud.dataform.v1alpha2.MakeDirectoryRequest; + + /** + * Encodes the specified MakeDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryRequest.verify|verify} messages. + * @param message MakeDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MakeDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryRequest.verify|verify} messages. + * @param message MakeDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.MakeDirectoryRequest; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.MakeDirectoryRequest; + + /** + * Verifies a MakeDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MakeDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MakeDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.MakeDirectoryRequest; + + /** + * Creates a plain object from a MakeDirectoryRequest message. Also converts values to other types if specified. + * @param message MakeDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.MakeDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MakeDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MakeDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MakeDirectoryResponse. */ + interface IMakeDirectoryResponse { + } + + /** Represents a MakeDirectoryResponse. */ + class MakeDirectoryResponse implements IMakeDirectoryResponse { + + /** + * Constructs a new MakeDirectoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IMakeDirectoryResponse); + + /** + * Creates a new MakeDirectoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MakeDirectoryResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IMakeDirectoryResponse): google.cloud.dataform.v1alpha2.MakeDirectoryResponse; + + /** + * Encodes the specified MakeDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryResponse.verify|verify} messages. + * @param message MakeDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MakeDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryResponse.verify|verify} messages. + * @param message MakeDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.MakeDirectoryResponse; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.MakeDirectoryResponse; + + /** + * Verifies a MakeDirectoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MakeDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MakeDirectoryResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.MakeDirectoryResponse; + + /** + * Creates a plain object from a MakeDirectoryResponse message. Also converts values to other types if specified. + * @param message MakeDirectoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.MakeDirectoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MakeDirectoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MakeDirectoryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveDirectoryRequest. */ + interface IRemoveDirectoryRequest { + + /** RemoveDirectoryRequest workspace */ + workspace?: (string|null); + + /** RemoveDirectoryRequest path */ + path?: (string|null); + } + + /** Represents a RemoveDirectoryRequest. */ + class RemoveDirectoryRequest implements IRemoveDirectoryRequest { + + /** + * Constructs a new RemoveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest); + + /** RemoveDirectoryRequest workspace. */ + public workspace: string; + + /** RemoveDirectoryRequest path. */ + public path: string; + + /** + * Creates a new RemoveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest): google.cloud.dataform.v1alpha2.RemoveDirectoryRequest; + + /** + * Encodes the specified RemoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveDirectoryRequest.verify|verify} messages. + * @param message RemoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveDirectoryRequest.verify|verify} messages. + * @param message RemoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.RemoveDirectoryRequest; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.RemoveDirectoryRequest; + + /** + * Verifies a RemoveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.RemoveDirectoryRequest; + + /** + * Creates a plain object from a RemoveDirectoryRequest message. Also converts values to other types if specified. + * @param message RemoveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.RemoveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MoveDirectoryRequest. */ + interface IMoveDirectoryRequest { + + /** MoveDirectoryRequest workspace */ + workspace?: (string|null); + + /** MoveDirectoryRequest path */ + path?: (string|null); + + /** MoveDirectoryRequest newPath */ + newPath?: (string|null); + } + + /** Represents a MoveDirectoryRequest. */ + class MoveDirectoryRequest implements IMoveDirectoryRequest { + + /** + * Constructs a new MoveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IMoveDirectoryRequest); + + /** MoveDirectoryRequest workspace. */ + public workspace: string; + + /** MoveDirectoryRequest path. */ + public path: string; + + /** MoveDirectoryRequest newPath. */ + public newPath: string; + + /** + * Creates a new MoveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IMoveDirectoryRequest): google.cloud.dataform.v1alpha2.MoveDirectoryRequest; + + /** + * Encodes the specified MoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryRequest.verify|verify} messages. + * @param message MoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryRequest.verify|verify} messages. + * @param message MoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.MoveDirectoryRequest; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.MoveDirectoryRequest; + + /** + * Verifies a MoveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.MoveDirectoryRequest; + + /** + * Creates a plain object from a MoveDirectoryRequest message. Also converts values to other types if specified. + * @param message MoveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.MoveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MoveDirectoryResponse. */ + interface IMoveDirectoryResponse { + } + + /** Represents a MoveDirectoryResponse. */ + class MoveDirectoryResponse implements IMoveDirectoryResponse { + + /** + * Constructs a new MoveDirectoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IMoveDirectoryResponse); + + /** + * Creates a new MoveDirectoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveDirectoryResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IMoveDirectoryResponse): google.cloud.dataform.v1alpha2.MoveDirectoryResponse; + + /** + * Encodes the specified MoveDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryResponse.verify|verify} messages. + * @param message MoveDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryResponse.verify|verify} messages. + * @param message MoveDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.MoveDirectoryResponse; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.MoveDirectoryResponse; + + /** + * Verifies a MoveDirectoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveDirectoryResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.MoveDirectoryResponse; + + /** + * Creates a plain object from a MoveDirectoryResponse message. Also converts values to other types if specified. + * @param message MoveDirectoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.MoveDirectoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveDirectoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveDirectoryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReadFileRequest. */ + interface IReadFileRequest { + + /** ReadFileRequest workspace */ + workspace?: (string|null); + + /** ReadFileRequest path */ + path?: (string|null); + } + + /** Represents a ReadFileRequest. */ + class ReadFileRequest implements IReadFileRequest { + + /** + * Constructs a new ReadFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IReadFileRequest); + + /** ReadFileRequest workspace. */ + public workspace: string; + + /** ReadFileRequest path. */ + public path: string; + + /** + * Creates a new ReadFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IReadFileRequest): google.cloud.dataform.v1alpha2.ReadFileRequest; + + /** + * Encodes the specified ReadFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileRequest.verify|verify} messages. + * @param message ReadFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IReadFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileRequest.verify|verify} messages. + * @param message ReadFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IReadFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ReadFileRequest; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ReadFileRequest; + + /** + * Verifies a ReadFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ReadFileRequest; + + /** + * Creates a plain object from a ReadFileRequest message. Also converts values to other types if specified. + * @param message ReadFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ReadFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReadFileResponse. */ + interface IReadFileResponse { + + /** ReadFileResponse fileContents */ + fileContents?: (Uint8Array|string|null); + } + + /** Represents a ReadFileResponse. */ + class ReadFileResponse implements IReadFileResponse { + + /** + * Constructs a new ReadFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IReadFileResponse); + + /** ReadFileResponse fileContents. */ + public fileContents: (Uint8Array|string); + + /** + * Creates a new ReadFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IReadFileResponse): google.cloud.dataform.v1alpha2.ReadFileResponse; + + /** + * Encodes the specified ReadFileResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileResponse.verify|verify} messages. + * @param message ReadFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IReadFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileResponse.verify|verify} messages. + * @param message ReadFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IReadFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ReadFileResponse; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ReadFileResponse; + + /** + * Verifies a ReadFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ReadFileResponse; + + /** + * Creates a plain object from a ReadFileResponse message. Also converts values to other types if specified. + * @param message ReadFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ReadFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadFileResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveFileRequest. */ + interface IRemoveFileRequest { + + /** RemoveFileRequest workspace */ + workspace?: (string|null); + + /** RemoveFileRequest path */ + path?: (string|null); + } + + /** Represents a RemoveFileRequest. */ + class RemoveFileRequest implements IRemoveFileRequest { + + /** + * Constructs a new RemoveFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IRemoveFileRequest); + + /** RemoveFileRequest workspace. */ + public workspace: string; + + /** RemoveFileRequest path. */ + public path: string; + + /** + * Creates a new RemoveFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IRemoveFileRequest): google.cloud.dataform.v1alpha2.RemoveFileRequest; + + /** + * Encodes the specified RemoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveFileRequest.verify|verify} messages. + * @param message RemoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IRemoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveFileRequest.verify|verify} messages. + * @param message RemoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IRemoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.RemoveFileRequest; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.RemoveFileRequest; + + /** + * Verifies a RemoveFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.RemoveFileRequest; + + /** + * Creates a plain object from a RemoveFileRequest message. Also converts values to other types if specified. + * @param message RemoveFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.RemoveFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MoveFileRequest. */ + interface IMoveFileRequest { + + /** MoveFileRequest workspace */ + workspace?: (string|null); + + /** MoveFileRequest path */ + path?: (string|null); + + /** MoveFileRequest newPath */ + newPath?: (string|null); + } + + /** Represents a MoveFileRequest. */ + class MoveFileRequest implements IMoveFileRequest { + + /** + * Constructs a new MoveFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IMoveFileRequest); + + /** MoveFileRequest workspace. */ + public workspace: string; + + /** MoveFileRequest path. */ + public path: string; + + /** MoveFileRequest newPath. */ + public newPath: string; + + /** + * Creates a new MoveFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IMoveFileRequest): google.cloud.dataform.v1alpha2.MoveFileRequest; + + /** + * Encodes the specified MoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileRequest.verify|verify} messages. + * @param message MoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IMoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileRequest.verify|verify} messages. + * @param message MoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IMoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.MoveFileRequest; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.MoveFileRequest; + + /** + * Verifies a MoveFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.MoveFileRequest; + + /** + * Creates a plain object from a MoveFileRequest message. Also converts values to other types if specified. + * @param message MoveFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.MoveFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MoveFileResponse. */ + interface IMoveFileResponse { + } + + /** Represents a MoveFileResponse. */ + class MoveFileResponse implements IMoveFileResponse { + + /** + * Constructs a new MoveFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IMoveFileResponse); + + /** + * Creates a new MoveFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IMoveFileResponse): google.cloud.dataform.v1alpha2.MoveFileResponse; + + /** + * Encodes the specified MoveFileResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileResponse.verify|verify} messages. + * @param message MoveFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IMoveFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileResponse.verify|verify} messages. + * @param message MoveFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IMoveFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.MoveFileResponse; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.MoveFileResponse; + + /** + * Verifies a MoveFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.MoveFileResponse; + + /** + * Creates a plain object from a MoveFileResponse message. Also converts values to other types if specified. + * @param message MoveFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.MoveFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveFileResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WriteFileRequest. */ + interface IWriteFileRequest { + + /** WriteFileRequest workspace */ + workspace?: (string|null); + + /** WriteFileRequest path */ + path?: (string|null); + + /** WriteFileRequest contents */ + contents?: (Uint8Array|string|null); + } + + /** Represents a WriteFileRequest. */ + class WriteFileRequest implements IWriteFileRequest { + + /** + * Constructs a new WriteFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IWriteFileRequest); + + /** WriteFileRequest workspace. */ + public workspace: string; + + /** WriteFileRequest path. */ + public path: string; + + /** WriteFileRequest contents. */ + public contents: (Uint8Array|string); + + /** + * Creates a new WriteFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IWriteFileRequest): google.cloud.dataform.v1alpha2.WriteFileRequest; + + /** + * Encodes the specified WriteFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileRequest.verify|verify} messages. + * @param message WriteFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IWriteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileRequest.verify|verify} messages. + * @param message WriteFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IWriteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.WriteFileRequest; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.WriteFileRequest; + + /** + * Verifies a WriteFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.WriteFileRequest; + + /** + * Creates a plain object from a WriteFileRequest message. Also converts values to other types if specified. + * @param message WriteFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.WriteFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WriteFileResponse. */ + interface IWriteFileResponse { + } + + /** Represents a WriteFileResponse. */ + class WriteFileResponse implements IWriteFileResponse { + + /** + * Constructs a new WriteFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IWriteFileResponse); + + /** + * Creates a new WriteFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IWriteFileResponse): google.cloud.dataform.v1alpha2.WriteFileResponse; + + /** + * Encodes the specified WriteFileResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileResponse.verify|verify} messages. + * @param message WriteFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IWriteFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileResponse.verify|verify} messages. + * @param message WriteFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IWriteFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.WriteFileResponse; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.WriteFileResponse; + + /** + * Verifies a WriteFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.WriteFileResponse; + + /** + * Creates a plain object from a WriteFileResponse message. Also converts values to other types if specified. + * @param message WriteFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.WriteFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteFileResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InstallNpmPackagesRequest. */ + interface IInstallNpmPackagesRequest { + + /** InstallNpmPackagesRequest workspace */ + workspace?: (string|null); + } + + /** Represents an InstallNpmPackagesRequest. */ + class InstallNpmPackagesRequest implements IInstallNpmPackagesRequest { + + /** + * Constructs a new InstallNpmPackagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest); + + /** InstallNpmPackagesRequest workspace. */ + public workspace: string; + + /** + * Creates a new InstallNpmPackagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InstallNpmPackagesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest): google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest; + + /** + * Encodes the specified InstallNpmPackagesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest.verify|verify} messages. + * @param message InstallNpmPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstallNpmPackagesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest.verify|verify} messages. + * @param message InstallNpmPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest; + + /** + * Verifies an InstallNpmPackagesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstallNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstallNpmPackagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest; + + /** + * Creates a plain object from an InstallNpmPackagesRequest message. Also converts values to other types if specified. + * @param message InstallNpmPackagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstallNpmPackagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstallNpmPackagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InstallNpmPackagesResponse. */ + interface IInstallNpmPackagesResponse { + } + + /** Represents an InstallNpmPackagesResponse. */ + class InstallNpmPackagesResponse implements IInstallNpmPackagesResponse { + + /** + * Constructs a new InstallNpmPackagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse); + + /** + * Creates a new InstallNpmPackagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns InstallNpmPackagesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse): google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse; + + /** + * Encodes the specified InstallNpmPackagesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse.verify|verify} messages. + * @param message InstallNpmPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstallNpmPackagesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse.verify|verify} messages. + * @param message InstallNpmPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse; + + /** + * Verifies an InstallNpmPackagesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstallNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstallNpmPackagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse; + + /** + * Creates a plain object from an InstallNpmPackagesResponse message. Also converts values to other types if specified. + * @param message InstallNpmPackagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstallNpmPackagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstallNpmPackagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompilationResult. */ + interface ICompilationResult { + + /** CompilationResult name */ + name?: (string|null); + + /** CompilationResult gitCommitish */ + gitCommitish?: (string|null); + + /** CompilationResult workspace */ + workspace?: (string|null); + + /** CompilationResult codeCompilationConfig */ + codeCompilationConfig?: (google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig|null); + + /** CompilationResult dataformCoreVersion */ + dataformCoreVersion?: (string|null); + + /** CompilationResult compilationErrors */ + compilationErrors?: (google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError[]|null); + } + + /** Represents a CompilationResult. */ + class CompilationResult implements ICompilationResult { + + /** + * Constructs a new CompilationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICompilationResult); + + /** CompilationResult name. */ + public name: string; + + /** CompilationResult gitCommitish. */ + public gitCommitish?: (string|null); + + /** CompilationResult workspace. */ + public workspace?: (string|null); + + /** CompilationResult codeCompilationConfig. */ + public codeCompilationConfig?: (google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig|null); + + /** CompilationResult dataformCoreVersion. */ + public dataformCoreVersion: string; + + /** CompilationResult compilationErrors. */ + public compilationErrors: google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError[]; + + /** CompilationResult source. */ + public source?: ("gitCommitish"|"workspace"); + + /** + * Creates a new CompilationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationResult instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICompilationResult): google.cloud.dataform.v1alpha2.CompilationResult; + + /** + * Encodes the specified CompilationResult message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.verify|verify} messages. + * @param message CompilationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICompilationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationResult message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.verify|verify} messages. + * @param message CompilationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICompilationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResult; + + /** + * Decodes a CompilationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResult; + + /** + * Verifies a CompilationResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResult; + + /** + * Creates a plain object from a CompilationResult message. Also converts values to other types if specified. + * @param message CompilationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompilationResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CompilationResult { + + /** Properties of a CodeCompilationConfig. */ + interface ICodeCompilationConfig { + + /** CodeCompilationConfig defaultDatabase */ + defaultDatabase?: (string|null); + + /** CodeCompilationConfig defaultSchema */ + defaultSchema?: (string|null); + + /** CodeCompilationConfig defaultLocation */ + defaultLocation?: (string|null); + + /** CodeCompilationConfig assertionSchema */ + assertionSchema?: (string|null); + + /** CodeCompilationConfig vars */ + vars?: ({ [k: string]: string }|null); + + /** CodeCompilationConfig databaseSuffix */ + databaseSuffix?: (string|null); + + /** CodeCompilationConfig schemaSuffix */ + schemaSuffix?: (string|null); + + /** CodeCompilationConfig tablePrefix */ + tablePrefix?: (string|null); + } + + /** Represents a CodeCompilationConfig. */ + class CodeCompilationConfig implements ICodeCompilationConfig { + + /** + * Constructs a new CodeCompilationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig); + + /** CodeCompilationConfig defaultDatabase. */ + public defaultDatabase: string; + + /** CodeCompilationConfig defaultSchema. */ + public defaultSchema: string; + + /** CodeCompilationConfig defaultLocation. */ + public defaultLocation: string; + + /** CodeCompilationConfig assertionSchema. */ + public assertionSchema: string; + + /** CodeCompilationConfig vars. */ + public vars: { [k: string]: string }; + + /** CodeCompilationConfig databaseSuffix. */ + public databaseSuffix: string; + + /** CodeCompilationConfig schemaSuffix. */ + public schemaSuffix: string; + + /** CodeCompilationConfig tablePrefix. */ + public tablePrefix: string; + + /** + * Creates a new CodeCompilationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CodeCompilationConfig instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig): google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig; + + /** + * Encodes the specified CodeCompilationConfig message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @param message CodeCompilationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CodeCompilationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @param message CodeCompilationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig; + + /** + * Verifies a CodeCompilationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CodeCompilationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CodeCompilationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig; + + /** + * Creates a plain object from a CodeCompilationConfig message. Also converts values to other types if specified. + * @param message CodeCompilationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CodeCompilationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CodeCompilationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompilationError. */ + interface ICompilationError { + + /** CompilationError message */ + message?: (string|null); + + /** CompilationError stack */ + stack?: (string|null); + + /** CompilationError path */ + path?: (string|null); + + /** CompilationError actionTarget */ + actionTarget?: (google.cloud.dataform.v1alpha2.ITarget|null); + } + + /** Represents a CompilationError. */ + class CompilationError implements ICompilationError { + + /** + * Constructs a new CompilationError. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError); + + /** CompilationError message. */ + public message: string; + + /** CompilationError stack. */ + public stack: string; + + /** CompilationError path. */ + public path: string; + + /** CompilationError actionTarget. */ + public actionTarget?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** + * Creates a new CompilationError instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationError instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError): google.cloud.dataform.v1alpha2.CompilationResult.CompilationError; + + /** + * Encodes the specified CompilationError message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.verify|verify} messages. + * @param message CompilationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationError message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.verify|verify} messages. + * @param message CompilationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResult.CompilationError; + + /** + * Decodes a CompilationError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResult.CompilationError; + + /** + * Verifies a CompilationError message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationError + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResult.CompilationError; + + /** + * Creates a plain object from a CompilationError message. Also converts values to other types if specified. + * @param message CompilationError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResult.CompilationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompilationError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ListCompilationResultsRequest. */ + interface IListCompilationResultsRequest { + + /** ListCompilationResultsRequest parent */ + parent?: (string|null); + + /** ListCompilationResultsRequest pageSize */ + pageSize?: (number|null); + + /** ListCompilationResultsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListCompilationResultsRequest. */ + class ListCompilationResultsRequest implements IListCompilationResultsRequest { + + /** + * Constructs a new ListCompilationResultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListCompilationResultsRequest); + + /** ListCompilationResultsRequest parent. */ + public parent: string; + + /** ListCompilationResultsRequest pageSize. */ + public pageSize: number; + + /** ListCompilationResultsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListCompilationResultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCompilationResultsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListCompilationResultsRequest): google.cloud.dataform.v1alpha2.ListCompilationResultsRequest; + + /** + * Encodes the specified ListCompilationResultsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsRequest.verify|verify} messages. + * @param message ListCompilationResultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCompilationResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsRequest.verify|verify} messages. + * @param message ListCompilationResultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListCompilationResultsRequest; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListCompilationResultsRequest; + + /** + * Verifies a ListCompilationResultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCompilationResultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCompilationResultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListCompilationResultsRequest; + + /** + * Creates a plain object from a ListCompilationResultsRequest message. Also converts values to other types if specified. + * @param message ListCompilationResultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListCompilationResultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCompilationResultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCompilationResultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCompilationResultsResponse. */ + interface IListCompilationResultsResponse { + + /** ListCompilationResultsResponse compilationResults */ + compilationResults?: (google.cloud.dataform.v1alpha2.ICompilationResult[]|null); + + /** ListCompilationResultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCompilationResultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCompilationResultsResponse. */ + class ListCompilationResultsResponse implements IListCompilationResultsResponse { + + /** + * Constructs a new ListCompilationResultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListCompilationResultsResponse); + + /** ListCompilationResultsResponse compilationResults. */ + public compilationResults: google.cloud.dataform.v1alpha2.ICompilationResult[]; + + /** ListCompilationResultsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCompilationResultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCompilationResultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCompilationResultsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListCompilationResultsResponse): google.cloud.dataform.v1alpha2.ListCompilationResultsResponse; + + /** + * Encodes the specified ListCompilationResultsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.verify|verify} messages. + * @param message ListCompilationResultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListCompilationResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCompilationResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.verify|verify} messages. + * @param message ListCompilationResultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListCompilationResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListCompilationResultsResponse; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListCompilationResultsResponse; + + /** + * Verifies a ListCompilationResultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCompilationResultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCompilationResultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListCompilationResultsResponse; + + /** + * Creates a plain object from a ListCompilationResultsResponse message. Also converts values to other types if specified. + * @param message ListCompilationResultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListCompilationResultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCompilationResultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCompilationResultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetCompilationResultRequest. */ + interface IGetCompilationResultRequest { + + /** GetCompilationResultRequest name */ + name?: (string|null); + } + + /** Represents a GetCompilationResultRequest. */ + class GetCompilationResultRequest implements IGetCompilationResultRequest { + + /** + * Constructs a new GetCompilationResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IGetCompilationResultRequest); + + /** GetCompilationResultRequest name. */ + public name: string; + + /** + * Creates a new GetCompilationResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCompilationResultRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IGetCompilationResultRequest): google.cloud.dataform.v1alpha2.GetCompilationResultRequest; + + /** + * Encodes the specified GetCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetCompilationResultRequest.verify|verify} messages. + * @param message GetCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetCompilationResultRequest.verify|verify} messages. + * @param message GetCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.GetCompilationResultRequest; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.GetCompilationResultRequest; + + /** + * Verifies a GetCompilationResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCompilationResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.GetCompilationResultRequest; + + /** + * Creates a plain object from a GetCompilationResultRequest message. Also converts values to other types if specified. + * @param message GetCompilationResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.GetCompilationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCompilationResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCompilationResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateCompilationResultRequest. */ + interface ICreateCompilationResultRequest { + + /** CreateCompilationResultRequest parent */ + parent?: (string|null); + + /** CreateCompilationResultRequest compilationResult */ + compilationResult?: (google.cloud.dataform.v1alpha2.ICompilationResult|null); + } + + /** Represents a CreateCompilationResultRequest. */ + class CreateCompilationResultRequest implements ICreateCompilationResultRequest { + + /** + * Constructs a new CreateCompilationResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest); + + /** CreateCompilationResultRequest parent. */ + public parent: string; + + /** CreateCompilationResultRequest compilationResult. */ + public compilationResult?: (google.cloud.dataform.v1alpha2.ICompilationResult|null); + + /** + * Creates a new CreateCompilationResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCompilationResultRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest): google.cloud.dataform.v1alpha2.CreateCompilationResultRequest; + + /** + * Encodes the specified CreateCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateCompilationResultRequest.verify|verify} messages. + * @param message CreateCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateCompilationResultRequest.verify|verify} messages. + * @param message CreateCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CreateCompilationResultRequest; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CreateCompilationResultRequest; + + /** + * Verifies a CreateCompilationResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCompilationResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CreateCompilationResultRequest; + + /** + * Creates a plain object from a CreateCompilationResultRequest message. Also converts values to other types if specified. + * @param message CreateCompilationResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CreateCompilationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCompilationResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCompilationResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Target. */ + interface ITarget { + + /** Target database */ + database?: (string|null); + + /** Target schema */ + schema?: (string|null); + + /** Target name */ + name?: (string|null); + } + + /** Represents a Target. */ + class Target implements ITarget { + + /** + * Constructs a new Target. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ITarget); + + /** Target database. */ + public database: string; + + /** Target schema. */ + public schema: string; + + /** Target name. */ + public name: string; + + /** + * Creates a new Target instance using the specified properties. + * @param [properties] Properties to set + * @returns Target instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ITarget): google.cloud.dataform.v1alpha2.Target; + + /** + * Encodes the specified Target message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Target.verify|verify} messages. + * @param message Target message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Target.verify|verify} messages. + * @param message Target message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Target message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.Target; + + /** + * Decodes a Target message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.Target; + + /** + * Verifies a Target message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Target message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Target + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.Target; + + /** + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @param message Target + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.Target, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Target to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Target + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RelationDescriptor. */ + interface IRelationDescriptor { + + /** RelationDescriptor description */ + description?: (string|null); + + /** RelationDescriptor columns */ + columns?: (google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor[]|null); + + /** RelationDescriptor bigqueryLabels */ + bigqueryLabels?: ({ [k: string]: string }|null); + } + + /** Represents a RelationDescriptor. */ + class RelationDescriptor implements IRelationDescriptor { + + /** + * Constructs a new RelationDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IRelationDescriptor); + + /** RelationDescriptor description. */ + public description: string; + + /** RelationDescriptor columns. */ + public columns: google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor[]; + + /** RelationDescriptor bigqueryLabels. */ + public bigqueryLabels: { [k: string]: string }; + + /** + * Creates a new RelationDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns RelationDescriptor instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IRelationDescriptor): google.cloud.dataform.v1alpha2.RelationDescriptor; + + /** + * Encodes the specified RelationDescriptor message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.verify|verify} messages. + * @param message RelationDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IRelationDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RelationDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.verify|verify} messages. + * @param message RelationDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IRelationDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.RelationDescriptor; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.RelationDescriptor; + + /** + * Verifies a RelationDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RelationDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RelationDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.RelationDescriptor; + + /** + * Creates a plain object from a RelationDescriptor message. Also converts values to other types if specified. + * @param message RelationDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.RelationDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RelationDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RelationDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RelationDescriptor { + + /** Properties of a ColumnDescriptor. */ + interface IColumnDescriptor { + + /** ColumnDescriptor path */ + path?: (string[]|null); + + /** ColumnDescriptor description */ + description?: (string|null); + + /** ColumnDescriptor bigqueryPolicyTags */ + bigqueryPolicyTags?: (string[]|null); + } + + /** Represents a ColumnDescriptor. */ + class ColumnDescriptor implements IColumnDescriptor { + + /** + * Constructs a new ColumnDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor); + + /** ColumnDescriptor path. */ + public path: string[]; + + /** ColumnDescriptor description. */ + public description: string; + + /** ColumnDescriptor bigqueryPolicyTags. */ + public bigqueryPolicyTags: string[]; + + /** + * Creates a new ColumnDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnDescriptor instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor): google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor; + + /** + * Encodes the specified ColumnDescriptor message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @param message ColumnDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ColumnDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @param message ColumnDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor; + + /** + * Verifies a ColumnDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ColumnDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor; + + /** + * Creates a plain object from a ColumnDescriptor message. Also converts values to other types if specified. + * @param message ColumnDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ColumnDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ColumnDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CompilationResultAction. */ + interface ICompilationResultAction { + + /** CompilationResultAction target */ + target?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** CompilationResultAction canonicalTarget */ + canonicalTarget?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** CompilationResultAction filePath */ + filePath?: (string|null); + + /** CompilationResultAction relation */ + relation?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation|null); + + /** CompilationResultAction operations */ + operations?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations|null); + + /** CompilationResultAction assertion */ + assertion?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion|null); + + /** CompilationResultAction declaration */ + declaration?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration|null); + } + + /** Represents a CompilationResultAction. */ + class CompilationResultAction implements ICompilationResultAction { + + /** + * Constructs a new CompilationResultAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICompilationResultAction); + + /** CompilationResultAction target. */ + public target?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** CompilationResultAction canonicalTarget. */ + public canonicalTarget?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** CompilationResultAction filePath. */ + public filePath: string; + + /** CompilationResultAction relation. */ + public relation?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation|null); + + /** CompilationResultAction operations. */ + public operations?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations|null); + + /** CompilationResultAction assertion. */ + public assertion?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion|null); + + /** CompilationResultAction declaration. */ + public declaration?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration|null); + + /** CompilationResultAction compiledObject. */ + public compiledObject?: ("relation"|"operations"|"assertion"|"declaration"); + + /** + * Creates a new CompilationResultAction instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationResultAction instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICompilationResultAction): google.cloud.dataform.v1alpha2.CompilationResultAction; + + /** + * Encodes the specified CompilationResultAction message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.verify|verify} messages. + * @param message CompilationResultAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICompilationResultAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationResultAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.verify|verify} messages. + * @param message CompilationResultAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICompilationResultAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResultAction; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResultAction; + + /** + * Verifies a CompilationResultAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationResultAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationResultAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResultAction; + + /** + * Creates a plain object from a CompilationResultAction message. Also converts values to other types if specified. + * @param message CompilationResultAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResultAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationResultAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompilationResultAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CompilationResultAction { + + /** Properties of a Relation. */ + interface IRelation { + + /** Relation dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1alpha2.ITarget[]|null); + + /** Relation disabled */ + disabled?: (boolean|null); + + /** Relation tags */ + tags?: (string[]|null); + + /** Relation relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + + /** Relation relationType */ + relationType?: (google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType|keyof typeof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType|null); + + /** Relation selectQuery */ + selectQuery?: (string|null); + + /** Relation preOperations */ + preOperations?: (string[]|null); + + /** Relation postOperations */ + postOperations?: (string[]|null); + + /** Relation incrementalTableConfig */ + incrementalTableConfig?: (google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig|null); + + /** Relation partitionExpression */ + partitionExpression?: (string|null); + + /** Relation clusterExpressions */ + clusterExpressions?: (string[]|null); + + /** Relation partitionExpirationDays */ + partitionExpirationDays?: (number|null); + + /** Relation requirePartitionFilter */ + requirePartitionFilter?: (boolean|null); + + /** Relation additionalOptions */ + additionalOptions?: ({ [k: string]: string }|null); + } + + /** Represents a Relation. */ + class Relation implements IRelation { + + /** + * Constructs a new Relation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation); + + /** Relation dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1alpha2.ITarget[]; + + /** Relation disabled. */ + public disabled: boolean; + + /** Relation tags. */ + public tags: string[]; + + /** Relation relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + + /** Relation relationType. */ + public relationType: (google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType|keyof typeof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType); + + /** Relation selectQuery. */ + public selectQuery: string; + + /** Relation preOperations. */ + public preOperations: string[]; + + /** Relation postOperations. */ + public postOperations: string[]; + + /** Relation incrementalTableConfig. */ + public incrementalTableConfig?: (google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig|null); + + /** Relation partitionExpression. */ + public partitionExpression: string; + + /** Relation clusterExpressions. */ + public clusterExpressions: string[]; + + /** Relation partitionExpirationDays. */ + public partitionExpirationDays: number; + + /** Relation requirePartitionFilter. */ + public requirePartitionFilter: boolean; + + /** Relation additionalOptions. */ + public additionalOptions: { [k: string]: string }; + + /** + * Creates a new Relation instance using the specified properties. + * @param [properties] Properties to set + * @returns Relation instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation; + + /** + * Encodes the specified Relation message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.verify|verify} messages. + * @param message Relation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Relation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.verify|verify} messages. + * @param message Relation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Relation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation; + + /** + * Decodes a Relation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation; + + /** + * Verifies a Relation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Relation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Relation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation; + + /** + * Creates a plain object from a Relation message. Also converts values to other types if specified. + * @param message Relation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Relation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Relation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Relation { + + /** RelationType enum. */ + enum RelationType { + RELATION_TYPE_UNSPECIFIED = 0, + TABLE = 1, + VIEW = 2, + INCREMENTAL_TABLE = 3, + MATERIALIZED_VIEW = 4 + } + + /** Properties of an IncrementalTableConfig. */ + interface IIncrementalTableConfig { + + /** IncrementalTableConfig incrementalSelectQuery */ + incrementalSelectQuery?: (string|null); + + /** IncrementalTableConfig refreshDisabled */ + refreshDisabled?: (boolean|null); + + /** IncrementalTableConfig uniqueKeyParts */ + uniqueKeyParts?: (string[]|null); + + /** IncrementalTableConfig updatePartitionFilter */ + updatePartitionFilter?: (string|null); + + /** IncrementalTableConfig incrementalPreOperations */ + incrementalPreOperations?: (string[]|null); + + /** IncrementalTableConfig incrementalPostOperations */ + incrementalPostOperations?: (string[]|null); + } + + /** Represents an IncrementalTableConfig. */ + class IncrementalTableConfig implements IIncrementalTableConfig { + + /** + * Constructs a new IncrementalTableConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig); + + /** IncrementalTableConfig incrementalSelectQuery. */ + public incrementalSelectQuery: string; + + /** IncrementalTableConfig refreshDisabled. */ + public refreshDisabled: boolean; + + /** IncrementalTableConfig uniqueKeyParts. */ + public uniqueKeyParts: string[]; + + /** IncrementalTableConfig updatePartitionFilter. */ + public updatePartitionFilter: string; + + /** IncrementalTableConfig incrementalPreOperations. */ + public incrementalPreOperations: string[]; + + /** IncrementalTableConfig incrementalPostOperations. */ + public incrementalPostOperations: string[]; + + /** + * Creates a new IncrementalTableConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IncrementalTableConfig instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Encodes the specified IncrementalTableConfig message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @param message IncrementalTableConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IncrementalTableConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @param message IncrementalTableConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Verifies an IncrementalTableConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IncrementalTableConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IncrementalTableConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Creates a plain object from an IncrementalTableConfig message. Also converts values to other types if specified. + * @param message IncrementalTableConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IncrementalTableConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IncrementalTableConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an Operations. */ + interface IOperations { + + /** Operations dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1alpha2.ITarget[]|null); + + /** Operations disabled */ + disabled?: (boolean|null); + + /** Operations tags */ + tags?: (string[]|null); + + /** Operations relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + + /** Operations queries */ + queries?: (string[]|null); + + /** Operations hasOutput */ + hasOutput?: (boolean|null); + } + + /** Represents an Operations. */ + class Operations implements IOperations { + + /** + * Constructs a new Operations. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations); + + /** Operations dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1alpha2.ITarget[]; + + /** Operations disabled. */ + public disabled: boolean; + + /** Operations tags. */ + public tags: string[]; + + /** Operations relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + + /** Operations queries. */ + public queries: string[]; + + /** Operations hasOutput. */ + public hasOutput: boolean; + + /** + * Creates a new Operations instance using the specified properties. + * @param [properties] Properties to set + * @returns Operations instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations): google.cloud.dataform.v1alpha2.CompilationResultAction.Operations; + + /** + * Encodes the specified Operations message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.verify|verify} messages. + * @param message Operations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operations message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.verify|verify} messages. + * @param message Operations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operations message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResultAction.Operations; + + /** + * Decodes an Operations message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResultAction.Operations; + + /** + * Verifies an Operations message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operations message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operations + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResultAction.Operations; + + /** + * Creates a plain object from an Operations message. Also converts values to other types if specified. + * @param message Operations + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Operations, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operations to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operations + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Assertion. */ + interface IAssertion { + + /** Assertion dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1alpha2.ITarget[]|null); + + /** Assertion parentAction */ + parentAction?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** Assertion disabled */ + disabled?: (boolean|null); + + /** Assertion tags */ + tags?: (string[]|null); + + /** Assertion selectQuery */ + selectQuery?: (string|null); + + /** Assertion relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + } + + /** Represents an Assertion. */ + class Assertion implements IAssertion { + + /** + * Constructs a new Assertion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion); + + /** Assertion dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1alpha2.ITarget[]; + + /** Assertion parentAction. */ + public parentAction?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** Assertion disabled. */ + public disabled: boolean; + + /** Assertion tags. */ + public tags: string[]; + + /** Assertion selectQuery. */ + public selectQuery: string; + + /** Assertion relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + + /** + * Creates a new Assertion instance using the specified properties. + * @param [properties] Properties to set + * @returns Assertion instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion): google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion; + + /** + * Encodes the specified Assertion message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.verify|verify} messages. + * @param message Assertion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Assertion message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.verify|verify} messages. + * @param message Assertion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Assertion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion; + + /** + * Decodes an Assertion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion; + + /** + * Verifies an Assertion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Assertion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Assertion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion; + + /** + * Creates a plain object from an Assertion message. Also converts values to other types if specified. + * @param message Assertion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Assertion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Assertion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration); + + /** Declaration relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration): google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a QueryCompilationResultActionsRequest. */ + interface IQueryCompilationResultActionsRequest { + + /** QueryCompilationResultActionsRequest name */ + name?: (string|null); + + /** QueryCompilationResultActionsRequest pageSize */ + pageSize?: (number|null); + + /** QueryCompilationResultActionsRequest pageToken */ + pageToken?: (string|null); + + /** QueryCompilationResultActionsRequest filter */ + filter?: (string|null); + } + + /** Represents a QueryCompilationResultActionsRequest. */ + class QueryCompilationResultActionsRequest implements IQueryCompilationResultActionsRequest { + + /** + * Constructs a new QueryCompilationResultActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest); + + /** QueryCompilationResultActionsRequest name. */ + public name: string; + + /** QueryCompilationResultActionsRequest pageSize. */ + public pageSize: number; + + /** QueryCompilationResultActionsRequest pageToken. */ + public pageToken: string; + + /** QueryCompilationResultActionsRequest filter. */ + public filter: string; + + /** + * Creates a new QueryCompilationResultActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCompilationResultActionsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest.verify|verify} messages. + * @param message QueryCompilationResultActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest.verify|verify} messages. + * @param message QueryCompilationResultActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest; + + /** + * Verifies a QueryCompilationResultActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryCompilationResultActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryCompilationResultActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest; + + /** + * Creates a plain object from a QueryCompilationResultActionsRequest message. Also converts values to other types if specified. + * @param message QueryCompilationResultActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryCompilationResultActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryCompilationResultActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryCompilationResultActionsResponse. */ + interface IQueryCompilationResultActionsResponse { + + /** QueryCompilationResultActionsResponse compilationResultActions */ + compilationResultActions?: (google.cloud.dataform.v1alpha2.ICompilationResultAction[]|null); + + /** QueryCompilationResultActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryCompilationResultActionsResponse. */ + class QueryCompilationResultActionsResponse implements IQueryCompilationResultActionsResponse { + + /** + * Constructs a new QueryCompilationResultActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse); + + /** QueryCompilationResultActionsResponse compilationResultActions. */ + public compilationResultActions: google.cloud.dataform.v1alpha2.ICompilationResultAction[]; + + /** QueryCompilationResultActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryCompilationResultActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCompilationResultActionsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.verify|verify} messages. + * @param message QueryCompilationResultActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.verify|verify} messages. + * @param message QueryCompilationResultActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse; + + /** + * Verifies a QueryCompilationResultActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryCompilationResultActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryCompilationResultActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse; + + /** + * Creates a plain object from a QueryCompilationResultActionsResponse message. Also converts values to other types if specified. + * @param message QueryCompilationResultActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryCompilationResultActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryCompilationResultActionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkflowInvocation. */ + interface IWorkflowInvocation { + + /** WorkflowInvocation name */ + name?: (string|null); + + /** WorkflowInvocation compilationResult */ + compilationResult?: (string|null); + + /** WorkflowInvocation invocationConfig */ + invocationConfig?: (google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig|null); + + /** WorkflowInvocation state */ + state?: (google.cloud.dataform.v1alpha2.WorkflowInvocation.State|keyof typeof google.cloud.dataform.v1alpha2.WorkflowInvocation.State|null); + + /** WorkflowInvocation invocationTiming */ + invocationTiming?: (google.type.IInterval|null); + } + + /** Represents a WorkflowInvocation. */ + class WorkflowInvocation implements IWorkflowInvocation { + + /** + * Constructs a new WorkflowInvocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IWorkflowInvocation); + + /** WorkflowInvocation name. */ + public name: string; + + /** WorkflowInvocation compilationResult. */ + public compilationResult: string; + + /** WorkflowInvocation invocationConfig. */ + public invocationConfig?: (google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig|null); + + /** WorkflowInvocation state. */ + public state: (google.cloud.dataform.v1alpha2.WorkflowInvocation.State|keyof typeof google.cloud.dataform.v1alpha2.WorkflowInvocation.State); + + /** WorkflowInvocation invocationTiming. */ + public invocationTiming?: (google.type.IInterval|null); + + /** + * Creates a new WorkflowInvocation instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowInvocation instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IWorkflowInvocation): google.cloud.dataform.v1alpha2.WorkflowInvocation; + + /** + * Encodes the specified WorkflowInvocation message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.verify|verify} messages. + * @param message WorkflowInvocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IWorkflowInvocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowInvocation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.verify|verify} messages. + * @param message WorkflowInvocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IWorkflowInvocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.WorkflowInvocation; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.WorkflowInvocation; + + /** + * Verifies a WorkflowInvocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkflowInvocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowInvocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.WorkflowInvocation; + + /** + * Creates a plain object from a WorkflowInvocation message. Also converts values to other types if specified. + * @param message WorkflowInvocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.WorkflowInvocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowInvocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkflowInvocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WorkflowInvocation { + + /** Properties of an InvocationConfig. */ + interface IInvocationConfig { + + /** InvocationConfig includedTargets */ + includedTargets?: (google.cloud.dataform.v1alpha2.ITarget[]|null); + + /** InvocationConfig includedTags */ + includedTags?: (string[]|null); + + /** InvocationConfig transitiveDependenciesIncluded */ + transitiveDependenciesIncluded?: (boolean|null); + + /** InvocationConfig transitiveDependentsIncluded */ + transitiveDependentsIncluded?: (boolean|null); + + /** InvocationConfig fullyRefreshIncrementalTablesEnabled */ + fullyRefreshIncrementalTablesEnabled?: (boolean|null); + } + + /** Represents an InvocationConfig. */ + class InvocationConfig implements IInvocationConfig { + + /** + * Constructs a new InvocationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig); + + /** InvocationConfig includedTargets. */ + public includedTargets: google.cloud.dataform.v1alpha2.ITarget[]; + + /** InvocationConfig includedTags. */ + public includedTags: string[]; + + /** InvocationConfig transitiveDependenciesIncluded. */ + public transitiveDependenciesIncluded: boolean; + + /** InvocationConfig transitiveDependentsIncluded. */ + public transitiveDependentsIncluded: boolean; + + /** InvocationConfig fullyRefreshIncrementalTablesEnabled. */ + public fullyRefreshIncrementalTablesEnabled: boolean; + + /** + * Creates a new InvocationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns InvocationConfig instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig): google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig; + + /** + * Encodes the specified InvocationConfig message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @param message InvocationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvocationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @param message InvocationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig; + + /** + * Verifies an InvocationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InvocationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvocationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig; + + /** + * Creates a plain object from an InvocationConfig message. Also converts values to other types if specified. + * @param message InvocationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvocationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InvocationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + CANCELLED = 3, + FAILED = 4, + CANCELING = 5 + } + } + + /** Properties of a ListWorkflowInvocationsRequest. */ + interface IListWorkflowInvocationsRequest { + + /** ListWorkflowInvocationsRequest parent */ + parent?: (string|null); + + /** ListWorkflowInvocationsRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkflowInvocationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListWorkflowInvocationsRequest. */ + class ListWorkflowInvocationsRequest implements IListWorkflowInvocationsRequest { + + /** + * Constructs a new ListWorkflowInvocationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest); + + /** ListWorkflowInvocationsRequest parent. */ + public parent: string; + + /** ListWorkflowInvocationsRequest pageSize. */ + public pageSize: number; + + /** ListWorkflowInvocationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListWorkflowInvocationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkflowInvocationsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest.verify|verify} messages. + * @param message ListWorkflowInvocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest.verify|verify} messages. + * @param message ListWorkflowInvocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest; + + /** + * Verifies a ListWorkflowInvocationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkflowInvocationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkflowInvocationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest; + + /** + * Creates a plain object from a ListWorkflowInvocationsRequest message. Also converts values to other types if specified. + * @param message ListWorkflowInvocationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkflowInvocationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkflowInvocationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListWorkflowInvocationsResponse. */ + interface IListWorkflowInvocationsResponse { + + /** ListWorkflowInvocationsResponse workflowInvocations */ + workflowInvocations?: (google.cloud.dataform.v1alpha2.IWorkflowInvocation[]|null); + + /** ListWorkflowInvocationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListWorkflowInvocationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListWorkflowInvocationsResponse. */ + class ListWorkflowInvocationsResponse implements IListWorkflowInvocationsResponse { + + /** + * Constructs a new ListWorkflowInvocationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse); + + /** ListWorkflowInvocationsResponse workflowInvocations. */ + public workflowInvocations: google.cloud.dataform.v1alpha2.IWorkflowInvocation[]; + + /** ListWorkflowInvocationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListWorkflowInvocationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListWorkflowInvocationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkflowInvocationsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.verify|verify} messages. + * @param message ListWorkflowInvocationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.verify|verify} messages. + * @param message ListWorkflowInvocationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse; + + /** + * Verifies a ListWorkflowInvocationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkflowInvocationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkflowInvocationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse; + + /** + * Creates a plain object from a ListWorkflowInvocationsResponse message. Also converts values to other types if specified. + * @param message ListWorkflowInvocationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkflowInvocationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkflowInvocationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetWorkflowInvocationRequest. */ + interface IGetWorkflowInvocationRequest { + + /** GetWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a GetWorkflowInvocationRequest. */ + class GetWorkflowInvocationRequest implements IGetWorkflowInvocationRequest { + + /** + * Constructs a new GetWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest); + + /** GetWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new GetWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest): google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest; + + /** + * Encodes the specified GetWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest.verify|verify} messages. + * @param message GetWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest.verify|verify} messages. + * @param message GetWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest; + + /** + * Verifies a GetWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest; + + /** + * Creates a plain object from a GetWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message GetWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateWorkflowInvocationRequest. */ + interface ICreateWorkflowInvocationRequest { + + /** CreateWorkflowInvocationRequest parent */ + parent?: (string|null); + + /** CreateWorkflowInvocationRequest workflowInvocation */ + workflowInvocation?: (google.cloud.dataform.v1alpha2.IWorkflowInvocation|null); + } + + /** Represents a CreateWorkflowInvocationRequest. */ + class CreateWorkflowInvocationRequest implements ICreateWorkflowInvocationRequest { + + /** + * Constructs a new CreateWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest); + + /** CreateWorkflowInvocationRequest parent. */ + public parent: string; + + /** CreateWorkflowInvocationRequest workflowInvocation. */ + public workflowInvocation?: (google.cloud.dataform.v1alpha2.IWorkflowInvocation|null); + + /** + * Creates a new CreateWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest): google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest.verify|verify} messages. + * @param message CreateWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest.verify|verify} messages. + * @param message CreateWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest; + + /** + * Verifies a CreateWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest; + + /** + * Creates a plain object from a CreateWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message CreateWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteWorkflowInvocationRequest. */ + interface IDeleteWorkflowInvocationRequest { + + /** DeleteWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteWorkflowInvocationRequest. */ + class DeleteWorkflowInvocationRequest implements IDeleteWorkflowInvocationRequest { + + /** + * Constructs a new DeleteWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest); + + /** DeleteWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new DeleteWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest): google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @param message DeleteWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @param message DeleteWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest; + + /** + * Verifies a DeleteWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest; + + /** + * Creates a plain object from a DeleteWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message DeleteWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelWorkflowInvocationRequest. */ + interface ICancelWorkflowInvocationRequest { + + /** CancelWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a CancelWorkflowInvocationRequest. */ + class CancelWorkflowInvocationRequest implements ICancelWorkflowInvocationRequest { + + /** + * Constructs a new CancelWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest); + + /** CancelWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new CancelWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest): google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest.verify|verify} messages. + * @param message CancelWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest.verify|verify} messages. + * @param message CancelWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest; + + /** + * Verifies a CancelWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest; + + /** + * Creates a plain object from a CancelWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message CancelWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkflowInvocationAction. */ + interface IWorkflowInvocationAction { + + /** WorkflowInvocationAction target */ + target?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** WorkflowInvocationAction canonicalTarget */ + canonicalTarget?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** WorkflowInvocationAction state */ + state?: (google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State|keyof typeof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State|null); + + /** WorkflowInvocationAction failureReason */ + failureReason?: (string|null); + + /** WorkflowInvocationAction invocationTiming */ + invocationTiming?: (google.type.IInterval|null); + + /** WorkflowInvocationAction bigqueryAction */ + bigqueryAction?: (google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction|null); + } + + /** Represents a WorkflowInvocationAction. */ + class WorkflowInvocationAction implements IWorkflowInvocationAction { + + /** + * Constructs a new WorkflowInvocationAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IWorkflowInvocationAction); + + /** WorkflowInvocationAction target. */ + public target?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** WorkflowInvocationAction canonicalTarget. */ + public canonicalTarget?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** WorkflowInvocationAction state. */ + public state: (google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State|keyof typeof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State); + + /** WorkflowInvocationAction failureReason. */ + public failureReason: string; + + /** WorkflowInvocationAction invocationTiming. */ + public invocationTiming?: (google.type.IInterval|null); + + /** WorkflowInvocationAction bigqueryAction. */ + public bigqueryAction?: (google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction|null); + + /** + * Creates a new WorkflowInvocationAction instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowInvocationAction instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IWorkflowInvocationAction): google.cloud.dataform.v1alpha2.WorkflowInvocationAction; + + /** + * Encodes the specified WorkflowInvocationAction message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.verify|verify} messages. + * @param message WorkflowInvocationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IWorkflowInvocationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowInvocationAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.verify|verify} messages. + * @param message WorkflowInvocationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IWorkflowInvocationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.WorkflowInvocationAction; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.WorkflowInvocationAction; + + /** + * Verifies a WorkflowInvocationAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkflowInvocationAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowInvocationAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.WorkflowInvocationAction; + + /** + * Creates a plain object from a WorkflowInvocationAction message. Also converts values to other types if specified. + * @param message WorkflowInvocationAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.WorkflowInvocationAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowInvocationAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkflowInvocationAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WorkflowInvocationAction { + + /** State enum. */ + enum State { + PENDING = 0, + RUNNING = 1, + SKIPPED = 2, + DISABLED = 3, + SUCCEEDED = 4, + CANCELLED = 5, + FAILED = 6 + } + + /** Properties of a BigQueryAction. */ + interface IBigQueryAction { + + /** BigQueryAction sqlScript */ + sqlScript?: (string|null); + } + + /** Represents a BigQueryAction. */ + class BigQueryAction implements IBigQueryAction { + + /** + * Constructs a new BigQueryAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction); + + /** BigQueryAction sqlScript. */ + public sqlScript: string; + + /** + * Creates a new BigQueryAction instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryAction instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction): google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction; + + /** + * Encodes the specified BigQueryAction message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @param message BigQueryAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @param message BigQueryAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction; + + /** + * Verifies a BigQueryAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction; + + /** + * Creates a plain object from a BigQueryAction message. Also converts values to other types if specified. + * @param message BigQueryAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a QueryWorkflowInvocationActionsRequest. */ + interface IQueryWorkflowInvocationActionsRequest { + + /** QueryWorkflowInvocationActionsRequest name */ + name?: (string|null); + + /** QueryWorkflowInvocationActionsRequest pageSize */ + pageSize?: (number|null); + + /** QueryWorkflowInvocationActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a QueryWorkflowInvocationActionsRequest. */ + class QueryWorkflowInvocationActionsRequest implements IQueryWorkflowInvocationActionsRequest { + + /** + * Constructs a new QueryWorkflowInvocationActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest); + + /** QueryWorkflowInvocationActionsRequest name. */ + public name: string; + + /** QueryWorkflowInvocationActionsRequest pageSize. */ + public pageSize: number; + + /** QueryWorkflowInvocationActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new QueryWorkflowInvocationActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryWorkflowInvocationActionsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest; + + /** + * Verifies a QueryWorkflowInvocationActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryWorkflowInvocationActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryWorkflowInvocationActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsRequest message. Also converts values to other types if specified. + * @param message QueryWorkflowInvocationActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryWorkflowInvocationActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryWorkflowInvocationActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryWorkflowInvocationActionsResponse. */ + interface IQueryWorkflowInvocationActionsResponse { + + /** QueryWorkflowInvocationActionsResponse workflowInvocationActions */ + workflowInvocationActions?: (google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[]|null); + + /** QueryWorkflowInvocationActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryWorkflowInvocationActionsResponse. */ + class QueryWorkflowInvocationActionsResponse implements IQueryWorkflowInvocationActionsResponse { + + /** + * Constructs a new QueryWorkflowInvocationActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse); + + /** QueryWorkflowInvocationActionsResponse workflowInvocationActions. */ + public workflowInvocationActions: google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[]; + + /** QueryWorkflowInvocationActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryWorkflowInvocationActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryWorkflowInvocationActionsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse; + + /** + * Verifies a QueryWorkflowInvocationActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryWorkflowInvocationActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryWorkflowInvocationActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsResponse message. Also converts values to other types if specified. + * @param message QueryWorkflowInvocationActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryWorkflowInvocationActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryWorkflowInvocationActionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace v1beta1. */ + namespace v1beta1 { + + /** Represents a Dataform */ + class Dataform extends $protobuf.rpc.Service { + + /** + * Constructs a new Dataform service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Dataform service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Dataform; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRepositoriesResponse + */ + public listRepositories(request: google.cloud.dataform.v1beta1.IListRepositoriesRequest, callback: google.cloud.dataform.v1beta1.Dataform.ListRepositoriesCallback): void; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @returns Promise + */ + public listRepositories(request: google.cloud.dataform.v1beta1.IListRepositoriesRequest): Promise; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public getRepository(request: google.cloud.dataform.v1beta1.IGetRepositoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.GetRepositoryCallback): void; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @returns Promise + */ + public getRepository(request: google.cloud.dataform.v1beta1.IGetRepositoryRequest): Promise; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public createRepository(request: google.cloud.dataform.v1beta1.ICreateRepositoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.CreateRepositoryCallback): void; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @returns Promise + */ + public createRepository(request: google.cloud.dataform.v1beta1.ICreateRepositoryRequest): Promise; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public updateRepository(request: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.UpdateRepositoryCallback): void; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @returns Promise + */ + public updateRepository(request: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest): Promise; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteRepository(request: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.DeleteRepositoryCallback): void; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @returns Promise + */ + public deleteRepository(request: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest): Promise; + + /** + * Calls FetchRemoteBranches. + * @param request FetchRemoteBranchesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchRemoteBranchesResponse + */ + public fetchRemoteBranches(request: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, callback: google.cloud.dataform.v1beta1.Dataform.FetchRemoteBranchesCallback): void; + + /** + * Calls FetchRemoteBranches. + * @param request FetchRemoteBranchesRequest message or plain object + * @returns Promise + */ + public fetchRemoteBranches(request: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest): Promise; + + /** + * Calls ListWorkspaces. + * @param request ListWorkspacesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkspacesResponse + */ + public listWorkspaces(request: google.cloud.dataform.v1beta1.IListWorkspacesRequest, callback: google.cloud.dataform.v1beta1.Dataform.ListWorkspacesCallback): void; + + /** + * Calls ListWorkspaces. + * @param request ListWorkspacesRequest message or plain object + * @returns Promise + */ + public listWorkspaces(request: google.cloud.dataform.v1beta1.IListWorkspacesRequest): Promise; + + /** + * Calls GetWorkspace. + * @param request GetWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Workspace + */ + public getWorkspace(request: google.cloud.dataform.v1beta1.IGetWorkspaceRequest, callback: google.cloud.dataform.v1beta1.Dataform.GetWorkspaceCallback): void; + + /** + * Calls GetWorkspace. + * @param request GetWorkspaceRequest message or plain object + * @returns Promise + */ + public getWorkspace(request: google.cloud.dataform.v1beta1.IGetWorkspaceRequest): Promise; + + /** + * Calls CreateWorkspace. + * @param request CreateWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Workspace + */ + public createWorkspace(request: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, callback: google.cloud.dataform.v1beta1.Dataform.CreateWorkspaceCallback): void; + + /** + * Calls CreateWorkspace. + * @param request CreateWorkspaceRequest message or plain object + * @returns Promise + */ + public createWorkspace(request: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest): Promise; + + /** + * Calls DeleteWorkspace. + * @param request DeleteWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteWorkspace(request: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, callback: google.cloud.dataform.v1beta1.Dataform.DeleteWorkspaceCallback): void; + + /** + * Calls DeleteWorkspace. + * @param request DeleteWorkspaceRequest message or plain object + * @returns Promise + */ + public deleteWorkspace(request: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest): Promise; + + /** + * Calls InstallNpmPackages. + * @param request InstallNpmPackagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InstallNpmPackagesResponse + */ + public installNpmPackages(request: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, callback: google.cloud.dataform.v1beta1.Dataform.InstallNpmPackagesCallback): void; + + /** + * Calls InstallNpmPackages. + * @param request InstallNpmPackagesRequest message or plain object + * @returns Promise + */ + public installNpmPackages(request: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest): Promise; + + /** + * Calls PullGitCommits. + * @param request PullGitCommitsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public pullGitCommits(request: google.cloud.dataform.v1beta1.IPullGitCommitsRequest, callback: google.cloud.dataform.v1beta1.Dataform.PullGitCommitsCallback): void; + + /** + * Calls PullGitCommits. + * @param request PullGitCommitsRequest message or plain object + * @returns Promise + */ + public pullGitCommits(request: google.cloud.dataform.v1beta1.IPullGitCommitsRequest): Promise; + + /** + * Calls PushGitCommits. + * @param request PushGitCommitsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public pushGitCommits(request: google.cloud.dataform.v1beta1.IPushGitCommitsRequest, callback: google.cloud.dataform.v1beta1.Dataform.PushGitCommitsCallback): void; + + /** + * Calls PushGitCommits. + * @param request PushGitCommitsRequest message or plain object + * @returns Promise + */ + public pushGitCommits(request: google.cloud.dataform.v1beta1.IPushGitCommitsRequest): Promise; + + /** + * Calls FetchFileGitStatuses. + * @param request FetchFileGitStatusesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchFileGitStatusesResponse + */ + public fetchFileGitStatuses(request: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, callback: google.cloud.dataform.v1beta1.Dataform.FetchFileGitStatusesCallback): void; + + /** + * Calls FetchFileGitStatuses. + * @param request FetchFileGitStatusesRequest message or plain object + * @returns Promise + */ + public fetchFileGitStatuses(request: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest): Promise; + + /** + * Calls FetchGitAheadBehind. + * @param request FetchGitAheadBehindRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchGitAheadBehindResponse + */ + public fetchGitAheadBehind(request: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, callback: google.cloud.dataform.v1beta1.Dataform.FetchGitAheadBehindCallback): void; + + /** + * Calls FetchGitAheadBehind. + * @param request FetchGitAheadBehindRequest message or plain object + * @returns Promise + */ + public fetchGitAheadBehind(request: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest): Promise; + + /** + * Calls CommitWorkspaceChanges. + * @param request CommitWorkspaceChangesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public commitWorkspaceChanges(request: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, callback: google.cloud.dataform.v1beta1.Dataform.CommitWorkspaceChangesCallback): void; + + /** + * Calls CommitWorkspaceChanges. + * @param request CommitWorkspaceChangesRequest message or plain object + * @returns Promise + */ + public commitWorkspaceChanges(request: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest): Promise; + + /** + * Calls ResetWorkspaceChanges. + * @param request ResetWorkspaceChangesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public resetWorkspaceChanges(request: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, callback: google.cloud.dataform.v1beta1.Dataform.ResetWorkspaceChangesCallback): void; + + /** + * Calls ResetWorkspaceChanges. + * @param request ResetWorkspaceChangesRequest message or plain object + * @returns Promise + */ + public resetWorkspaceChanges(request: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest): Promise; + + /** + * Calls FetchFileDiff. + * @param request FetchFileDiffRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchFileDiffResponse + */ + public fetchFileDiff(request: google.cloud.dataform.v1beta1.IFetchFileDiffRequest, callback: google.cloud.dataform.v1beta1.Dataform.FetchFileDiffCallback): void; + + /** + * Calls FetchFileDiff. + * @param request FetchFileDiffRequest message or plain object + * @returns Promise + */ + public fetchFileDiff(request: google.cloud.dataform.v1beta1.IFetchFileDiffRequest): Promise; + + /** + * Calls QueryDirectoryContents. + * @param request QueryDirectoryContentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDirectoryContentsResponse + */ + public queryDirectoryContents(request: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, callback: google.cloud.dataform.v1beta1.Dataform.QueryDirectoryContentsCallback): void; + + /** + * Calls QueryDirectoryContents. + * @param request QueryDirectoryContentsRequest message or plain object + * @returns Promise + */ + public queryDirectoryContents(request: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest): Promise; + + /** + * Calls MakeDirectory. + * @param request MakeDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MakeDirectoryResponse + */ + public makeDirectory(request: google.cloud.dataform.v1beta1.IMakeDirectoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.MakeDirectoryCallback): void; + + /** + * Calls MakeDirectory. + * @param request MakeDirectoryRequest message or plain object + * @returns Promise + */ + public makeDirectory(request: google.cloud.dataform.v1beta1.IMakeDirectoryRequest): Promise; + + /** + * Calls RemoveDirectory. + * @param request RemoveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public removeDirectory(request: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.RemoveDirectoryCallback): void; + + /** + * Calls RemoveDirectory. + * @param request RemoveDirectoryRequest message or plain object + * @returns Promise + */ + public removeDirectory(request: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest): Promise; + + /** + * Calls MoveDirectory. + * @param request MoveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MoveDirectoryResponse + */ + public moveDirectory(request: google.cloud.dataform.v1beta1.IMoveDirectoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.MoveDirectoryCallback): void; + + /** + * Calls MoveDirectory. + * @param request MoveDirectoryRequest message or plain object + * @returns Promise + */ + public moveDirectory(request: google.cloud.dataform.v1beta1.IMoveDirectoryRequest): Promise; + + /** + * Calls ReadFile. + * @param request ReadFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadFileResponse + */ + public readFile(request: google.cloud.dataform.v1beta1.IReadFileRequest, callback: google.cloud.dataform.v1beta1.Dataform.ReadFileCallback): void; + + /** + * Calls ReadFile. + * @param request ReadFileRequest message or plain object + * @returns Promise + */ + public readFile(request: google.cloud.dataform.v1beta1.IReadFileRequest): Promise; + + /** + * Calls RemoveFile. + * @param request RemoveFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public removeFile(request: google.cloud.dataform.v1beta1.IRemoveFileRequest, callback: google.cloud.dataform.v1beta1.Dataform.RemoveFileCallback): void; + + /** + * Calls RemoveFile. + * @param request RemoveFileRequest message or plain object + * @returns Promise + */ + public removeFile(request: google.cloud.dataform.v1beta1.IRemoveFileRequest): Promise; + + /** + * Calls MoveFile. + * @param request MoveFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MoveFileResponse + */ + public moveFile(request: google.cloud.dataform.v1beta1.IMoveFileRequest, callback: google.cloud.dataform.v1beta1.Dataform.MoveFileCallback): void; + + /** + * Calls MoveFile. + * @param request MoveFileRequest message or plain object + * @returns Promise + */ + public moveFile(request: google.cloud.dataform.v1beta1.IMoveFileRequest): Promise; + + /** + * Calls WriteFile. + * @param request WriteFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WriteFileResponse + */ + public writeFile(request: google.cloud.dataform.v1beta1.IWriteFileRequest, callback: google.cloud.dataform.v1beta1.Dataform.WriteFileCallback): void; + + /** + * Calls WriteFile. + * @param request WriteFileRequest message or plain object + * @returns Promise + */ + public writeFile(request: google.cloud.dataform.v1beta1.IWriteFileRequest): Promise; + + /** + * Calls ListCompilationResults. + * @param request ListCompilationResultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCompilationResultsResponse + */ + public listCompilationResults(request: google.cloud.dataform.v1beta1.IListCompilationResultsRequest, callback: google.cloud.dataform.v1beta1.Dataform.ListCompilationResultsCallback): void; + + /** + * Calls ListCompilationResults. + * @param request ListCompilationResultsRequest message or plain object + * @returns Promise + */ + public listCompilationResults(request: google.cloud.dataform.v1beta1.IListCompilationResultsRequest): Promise; + + /** + * Calls GetCompilationResult. + * @param request GetCompilationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompilationResult + */ + public getCompilationResult(request: google.cloud.dataform.v1beta1.IGetCompilationResultRequest, callback: google.cloud.dataform.v1beta1.Dataform.GetCompilationResultCallback): void; + + /** + * Calls GetCompilationResult. + * @param request GetCompilationResultRequest message or plain object + * @returns Promise + */ + public getCompilationResult(request: google.cloud.dataform.v1beta1.IGetCompilationResultRequest): Promise; + + /** + * Calls CreateCompilationResult. + * @param request CreateCompilationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompilationResult + */ + public createCompilationResult(request: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, callback: google.cloud.dataform.v1beta1.Dataform.CreateCompilationResultCallback): void; + + /** + * Calls CreateCompilationResult. + * @param request CreateCompilationResultRequest message or plain object + * @returns Promise + */ + public createCompilationResult(request: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest): Promise; + + /** + * Calls QueryCompilationResultActions. + * @param request QueryCompilationResultActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryCompilationResultActionsResponse + */ + public queryCompilationResultActions(request: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, callback: google.cloud.dataform.v1beta1.Dataform.QueryCompilationResultActionsCallback): void; + + /** + * Calls QueryCompilationResultActions. + * @param request QueryCompilationResultActionsRequest message or plain object + * @returns Promise + */ + public queryCompilationResultActions(request: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest): Promise; + + /** + * Calls ListWorkflowInvocations. + * @param request ListWorkflowInvocationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkflowInvocationsResponse + */ + public listWorkflowInvocations(request: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, callback: google.cloud.dataform.v1beta1.Dataform.ListWorkflowInvocationsCallback): void; + + /** + * Calls ListWorkflowInvocations. + * @param request ListWorkflowInvocationsRequest message or plain object + * @returns Promise + */ + public listWorkflowInvocations(request: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest): Promise; + + /** + * Calls GetWorkflowInvocation. + * @param request GetWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkflowInvocation + */ + public getWorkflowInvocation(request: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, callback: google.cloud.dataform.v1beta1.Dataform.GetWorkflowInvocationCallback): void; + + /** + * Calls GetWorkflowInvocation. + * @param request GetWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public getWorkflowInvocation(request: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest): Promise; + + /** + * Calls CreateWorkflowInvocation. + * @param request CreateWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkflowInvocation + */ + public createWorkflowInvocation(request: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, callback: google.cloud.dataform.v1beta1.Dataform.CreateWorkflowInvocationCallback): void; + + /** + * Calls CreateWorkflowInvocation. + * @param request CreateWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public createWorkflowInvocation(request: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest): Promise; + + /** + * Calls DeleteWorkflowInvocation. + * @param request DeleteWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteWorkflowInvocation(request: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, callback: google.cloud.dataform.v1beta1.Dataform.DeleteWorkflowInvocationCallback): void; + + /** + * Calls DeleteWorkflowInvocation. + * @param request DeleteWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public deleteWorkflowInvocation(request: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest): Promise; + + /** + * Calls CancelWorkflowInvocation. + * @param request CancelWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelWorkflowInvocation(request: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, callback: google.cloud.dataform.v1beta1.Dataform.CancelWorkflowInvocationCallback): void; + + /** + * Calls CancelWorkflowInvocation. + * @param request CancelWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public cancelWorkflowInvocation(request: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest): Promise; + + /** + * Calls QueryWorkflowInvocationActions. + * @param request QueryWorkflowInvocationActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryWorkflowInvocationActionsResponse + */ + public queryWorkflowInvocationActions(request: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, callback: google.cloud.dataform.v1beta1.Dataform.QueryWorkflowInvocationActionsCallback): void; + + /** + * Calls QueryWorkflowInvocationActions. + * @param request QueryWorkflowInvocationActionsRequest message or plain object + * @returns Promise + */ + public queryWorkflowInvocationActions(request: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest): Promise; + } + + namespace Dataform { + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listRepositories}. + * @param error Error, if any + * @param [response] ListRepositoriesResponse + */ + type ListRepositoriesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListRepositoriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type GetRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type CreateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|updateRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type UpdateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|deleteRepository}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteRepositoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchRemoteBranches}. + * @param error Error, if any + * @param [response] FetchRemoteBranchesResponse + */ + type FetchRemoteBranchesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listWorkspaces}. + * @param error Error, if any + * @param [response] ListWorkspacesResponse + */ + type ListWorkspacesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListWorkspacesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getWorkspace}. + * @param error Error, if any + * @param [response] Workspace + */ + type GetWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Workspace) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createWorkspace}. + * @param error Error, if any + * @param [response] Workspace + */ + type CreateWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Workspace) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|deleteWorkspace}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteWorkspaceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|installNpmPackages}. + * @param error Error, if any + * @param [response] InstallNpmPackagesResponse + */ + type InstallNpmPackagesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.InstallNpmPackagesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|pullGitCommits}. + * @param error Error, if any + * @param [response] Empty + */ + type PullGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|pushGitCommits}. + * @param error Error, if any + * @param [response] Empty + */ + type PushGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchFileGitStatuses}. + * @param error Error, if any + * @param [response] FetchFileGitStatusesResponse + */ + type FetchFileGitStatusesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchGitAheadBehind}. + * @param error Error, if any + * @param [response] FetchGitAheadBehindResponse + */ + type FetchGitAheadBehindCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|commitWorkspaceChanges}. + * @param error Error, if any + * @param [response] Empty + */ + type CommitWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|resetWorkspaceChanges}. + * @param error Error, if any + * @param [response] Empty + */ + type ResetWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchFileDiff}. + * @param error Error, if any + * @param [response] FetchFileDiffResponse + */ + type FetchFileDiffCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchFileDiffResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|queryDirectoryContents}. + * @param error Error, if any + * @param [response] QueryDirectoryContentsResponse + */ + type QueryDirectoryContentsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|makeDirectory}. + * @param error Error, if any + * @param [response] MakeDirectoryResponse + */ + type MakeDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.MakeDirectoryResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|removeDirectory}. + * @param error Error, if any + * @param [response] Empty + */ + type RemoveDirectoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|moveDirectory}. + * @param error Error, if any + * @param [response] MoveDirectoryResponse + */ + type MoveDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.MoveDirectoryResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|readFile}. + * @param error Error, if any + * @param [response] ReadFileResponse + */ + type ReadFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ReadFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|removeFile}. + * @param error Error, if any + * @param [response] Empty + */ + type RemoveFileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|moveFile}. + * @param error Error, if any + * @param [response] MoveFileResponse + */ + type MoveFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.MoveFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|writeFile}. + * @param error Error, if any + * @param [response] WriteFileResponse + */ + type WriteFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.WriteFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listCompilationResults}. + * @param error Error, if any + * @param [response] ListCompilationResultsResponse + */ + type ListCompilationResultsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListCompilationResultsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getCompilationResult}. + * @param error Error, if any + * @param [response] CompilationResult + */ + type GetCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.CompilationResult) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createCompilationResult}. + * @param error Error, if any + * @param [response] CompilationResult + */ + type CreateCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.CompilationResult) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|queryCompilationResultActions}. + * @param error Error, if any + * @param [response] QueryCompilationResultActionsResponse + */ + type QueryCompilationResultActionsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listWorkflowInvocations}. + * @param error Error, if any + * @param [response] ListWorkflowInvocationsResponse + */ + type ListWorkflowInvocationsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getWorkflowInvocation}. + * @param error Error, if any + * @param [response] WorkflowInvocation + */ + type GetWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.WorkflowInvocation) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createWorkflowInvocation}. + * @param error Error, if any + * @param [response] WorkflowInvocation + */ + type CreateWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.WorkflowInvocation) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|deleteWorkflowInvocation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|cancelWorkflowInvocation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|queryWorkflowInvocationActions}. + * @param error Error, if any + * @param [response] QueryWorkflowInvocationActionsResponse + */ + type QueryWorkflowInvocationActionsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse) => void; + } + + /** Properties of a Repository. */ + interface IRepository { + + /** Repository name */ + name?: (string|null); + + /** Repository gitRemoteSettings */ + gitRemoteSettings?: (google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings|null); + } + + /** Represents a Repository. */ + class Repository implements IRepository { + + /** + * Constructs a new Repository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IRepository); + + /** Repository name. */ + public name: string; + + /** Repository gitRemoteSettings. */ + public gitRemoteSettings?: (google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings|null); + + /** + * Creates a new Repository instance using the specified properties. + * @param [properties] Properties to set + * @returns Repository instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IRepository): google.cloud.dataform.v1beta1.Repository; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.Repository; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.Repository; + + /** + * Verifies a Repository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Repository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.Repository; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @param message Repository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Repository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Repository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Repository { + + /** Properties of a GitRemoteSettings. */ + interface IGitRemoteSettings { + + /** GitRemoteSettings url */ + url?: (string|null); + + /** GitRemoteSettings defaultBranch */ + defaultBranch?: (string|null); + + /** GitRemoteSettings authenticationTokenSecretVersion */ + authenticationTokenSecretVersion?: (string|null); + + /** GitRemoteSettings tokenStatus */ + tokenStatus?: (google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus|keyof typeof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus|null); + } + + /** Represents a GitRemoteSettings. */ + class GitRemoteSettings implements IGitRemoteSettings { + + /** + * Constructs a new GitRemoteSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings); + + /** GitRemoteSettings url. */ + public url: string; + + /** GitRemoteSettings defaultBranch. */ + public defaultBranch: string; + + /** GitRemoteSettings authenticationTokenSecretVersion. */ + public authenticationTokenSecretVersion: string; + + /** GitRemoteSettings tokenStatus. */ + public tokenStatus: (google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus|keyof typeof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus); + + /** + * Creates a new GitRemoteSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GitRemoteSettings instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings): google.cloud.dataform.v1beta1.Repository.GitRemoteSettings; + + /** + * Encodes the specified GitRemoteSettings message. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify|verify} messages. + * @param message GitRemoteSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GitRemoteSettings message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify|verify} messages. + * @param message GitRemoteSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.Repository.GitRemoteSettings; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.Repository.GitRemoteSettings; + + /** + * Verifies a GitRemoteSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GitRemoteSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GitRemoteSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.Repository.GitRemoteSettings; + + /** + * Creates a plain object from a GitRemoteSettings message. Also converts values to other types if specified. + * @param message GitRemoteSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.Repository.GitRemoteSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GitRemoteSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GitRemoteSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GitRemoteSettings { + + /** TokenStatus enum. */ + enum TokenStatus { + TOKEN_STATUS_UNSPECIFIED = 0, + NOT_FOUND = 1, + INVALID = 2, + VALID = 3 + } + } + } + + /** Properties of a ListRepositoriesRequest. */ + interface IListRepositoriesRequest { + + /** ListRepositoriesRequest parent */ + parent?: (string|null); + + /** ListRepositoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListRepositoriesRequest pageToken */ + pageToken?: (string|null); + + /** ListRepositoriesRequest orderBy */ + orderBy?: (string|null); + + /** ListRepositoriesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListRepositoriesRequest. */ + class ListRepositoriesRequest implements IListRepositoriesRequest { + + /** + * Constructs a new ListRepositoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListRepositoriesRequest); + + /** ListRepositoriesRequest parent. */ + public parent: string; + + /** ListRepositoriesRequest pageSize. */ + public pageSize: number; + + /** ListRepositoriesRequest pageToken. */ + public pageToken: string; + + /** ListRepositoriesRequest orderBy. */ + public orderBy: string; + + /** ListRepositoriesRequest filter. */ + public filter: string; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListRepositoriesRequest): google.cloud.dataform.v1beta1.ListRepositoriesRequest; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListRepositoriesRequest; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListRepositoriesRequest; + + /** + * Verifies a ListRepositoriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListRepositoriesRequest; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @param message ListRepositoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRepositoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRepositoriesResponse. */ + interface IListRepositoriesResponse { + + /** ListRepositoriesResponse repositories */ + repositories?: (google.cloud.dataform.v1beta1.IRepository[]|null); + + /** ListRepositoriesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListRepositoriesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListRepositoriesResponse. */ + class ListRepositoriesResponse implements IListRepositoriesResponse { + + /** + * Constructs a new ListRepositoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListRepositoriesResponse); + + /** ListRepositoriesResponse repositories. */ + public repositories: google.cloud.dataform.v1beta1.IRepository[]; + + /** ListRepositoriesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListRepositoriesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListRepositoriesResponse): google.cloud.dataform.v1beta1.ListRepositoriesResponse; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListRepositoriesResponse; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListRepositoriesResponse; + + /** + * Verifies a ListRepositoriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListRepositoriesResponse; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @param message ListRepositoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRepositoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetRepositoryRequest. */ + interface IGetRepositoryRequest { + + /** GetRepositoryRequest name */ + name?: (string|null); + } + + /** Represents a GetRepositoryRequest. */ + class GetRepositoryRequest implements IGetRepositoryRequest { + + /** + * Constructs a new GetRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IGetRepositoryRequest); + + /** GetRepositoryRequest name. */ + public name: string; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IGetRepositoryRequest): google.cloud.dataform.v1beta1.GetRepositoryRequest; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.GetRepositoryRequest; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.GetRepositoryRequest; + + /** + * Verifies a GetRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.GetRepositoryRequest; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @param message GetRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.GetRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateRepositoryRequest. */ + interface ICreateRepositoryRequest { + + /** CreateRepositoryRequest parent */ + parent?: (string|null); + + /** CreateRepositoryRequest repository */ + repository?: (google.cloud.dataform.v1beta1.IRepository|null); + + /** CreateRepositoryRequest repositoryId */ + repositoryId?: (string|null); + } + + /** Represents a CreateRepositoryRequest. */ + class CreateRepositoryRequest implements ICreateRepositoryRequest { + + /** + * Constructs a new CreateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICreateRepositoryRequest); + + /** CreateRepositoryRequest parent. */ + public parent: string; + + /** CreateRepositoryRequest repository. */ + public repository?: (google.cloud.dataform.v1beta1.IRepository|null); + + /** CreateRepositoryRequest repositoryId. */ + public repositoryId: string; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICreateRepositoryRequest): google.cloud.dataform.v1beta1.CreateRepositoryRequest; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CreateRepositoryRequest; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CreateRepositoryRequest; + + /** + * Verifies a CreateRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CreateRepositoryRequest; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @param message CreateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CreateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateRepositoryRequest. */ + interface IUpdateRepositoryRequest { + + /** UpdateRepositoryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateRepositoryRequest repository */ + repository?: (google.cloud.dataform.v1beta1.IRepository|null); + } + + /** Represents an UpdateRepositoryRequest. */ + class UpdateRepositoryRequest implements IUpdateRepositoryRequest { + + /** + * Constructs a new UpdateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest); + + /** UpdateRepositoryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateRepositoryRequest repository. */ + public repository?: (google.cloud.dataform.v1beta1.IRepository|null); + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest): google.cloud.dataform.v1beta1.UpdateRepositoryRequest; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.UpdateRepositoryRequest; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.UpdateRepositoryRequest; + + /** + * Verifies an UpdateRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.UpdateRepositoryRequest; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @param message UpdateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.UpdateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteRepositoryRequest. */ + interface IDeleteRepositoryRequest { + + /** DeleteRepositoryRequest name */ + name?: (string|null); + + /** DeleteRepositoryRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteRepositoryRequest. */ + class DeleteRepositoryRequest implements IDeleteRepositoryRequest { + + /** + * Constructs a new DeleteRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest); + + /** DeleteRepositoryRequest name. */ + public name: string; + + /** DeleteRepositoryRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest): google.cloud.dataform.v1beta1.DeleteRepositoryRequest; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.DeleteRepositoryRequest; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.DeleteRepositoryRequest; + + /** + * Verifies a DeleteRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.DeleteRepositoryRequest; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @param message DeleteRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.DeleteRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchRemoteBranchesRequest. */ + interface IFetchRemoteBranchesRequest { + + /** FetchRemoteBranchesRequest name */ + name?: (string|null); + } + + /** Represents a FetchRemoteBranchesRequest. */ + class FetchRemoteBranchesRequest implements IFetchRemoteBranchesRequest { + + /** + * Constructs a new FetchRemoteBranchesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest); + + /** FetchRemoteBranchesRequest name. */ + public name: string; + + /** + * Creates a new FetchRemoteBranchesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchRemoteBranchesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest): google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest; + + /** + * Encodes the specified FetchRemoteBranchesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest.verify|verify} messages. + * @param message FetchRemoteBranchesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchRemoteBranchesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest.verify|verify} messages. + * @param message FetchRemoteBranchesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest; + + /** + * Verifies a FetchRemoteBranchesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchRemoteBranchesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchRemoteBranchesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest; + + /** + * Creates a plain object from a FetchRemoteBranchesRequest message. Also converts values to other types if specified. + * @param message FetchRemoteBranchesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchRemoteBranchesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchRemoteBranchesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchRemoteBranchesResponse. */ + interface IFetchRemoteBranchesResponse { + + /** FetchRemoteBranchesResponse branches */ + branches?: (string[]|null); + } + + /** Represents a FetchRemoteBranchesResponse. */ + class FetchRemoteBranchesResponse implements IFetchRemoteBranchesResponse { + + /** + * Constructs a new FetchRemoteBranchesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse); + + /** FetchRemoteBranchesResponse branches. */ + public branches: string[]; + + /** + * Creates a new FetchRemoteBranchesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchRemoteBranchesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse): google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse; + + /** + * Encodes the specified FetchRemoteBranchesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.verify|verify} messages. + * @param message FetchRemoteBranchesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchRemoteBranchesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.verify|verify} messages. + * @param message FetchRemoteBranchesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse; + + /** + * Verifies a FetchRemoteBranchesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchRemoteBranchesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchRemoteBranchesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse; + + /** + * Creates a plain object from a FetchRemoteBranchesResponse message. Also converts values to other types if specified. + * @param message FetchRemoteBranchesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchRemoteBranchesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchRemoteBranchesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Workspace. */ + interface IWorkspace { + + /** Workspace name */ + name?: (string|null); + } + + /** Represents a Workspace. */ + class Workspace implements IWorkspace { + + /** + * Constructs a new Workspace. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWorkspace); + + /** Workspace name. */ + public name: string; + + /** + * Creates a new Workspace instance using the specified properties. + * @param [properties] Properties to set + * @returns Workspace instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWorkspace): google.cloud.dataform.v1beta1.Workspace; + + /** + * Encodes the specified Workspace message. Does not implicitly {@link google.cloud.dataform.v1beta1.Workspace.verify|verify} messages. + * @param message Workspace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWorkspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Workspace message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Workspace.verify|verify} messages. + * @param message Workspace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWorkspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Workspace message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.Workspace; + + /** + * Decodes a Workspace message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.Workspace; + + /** + * Verifies a Workspace message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Workspace message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Workspace + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.Workspace; + + /** + * Creates a plain object from a Workspace message. Also converts values to other types if specified. + * @param message Workspace + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.Workspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Workspace to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Workspace + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListWorkspacesRequest. */ + interface IListWorkspacesRequest { + + /** ListWorkspacesRequest parent */ + parent?: (string|null); + + /** ListWorkspacesRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkspacesRequest pageToken */ + pageToken?: (string|null); + + /** ListWorkspacesRequest orderBy */ + orderBy?: (string|null); + + /** ListWorkspacesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListWorkspacesRequest. */ + class ListWorkspacesRequest implements IListWorkspacesRequest { + + /** + * Constructs a new ListWorkspacesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListWorkspacesRequest); + + /** ListWorkspacesRequest parent. */ + public parent: string; + + /** ListWorkspacesRequest pageSize. */ + public pageSize: number; + + /** ListWorkspacesRequest pageToken. */ + public pageToken: string; + + /** ListWorkspacesRequest orderBy. */ + public orderBy: string; + + /** ListWorkspacesRequest filter. */ + public filter: string; + + /** + * Creates a new ListWorkspacesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkspacesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListWorkspacesRequest): google.cloud.dataform.v1beta1.ListWorkspacesRequest; + + /** + * Encodes the specified ListWorkspacesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesRequest.verify|verify} messages. + * @param message ListWorkspacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListWorkspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkspacesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesRequest.verify|verify} messages. + * @param message ListWorkspacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListWorkspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListWorkspacesRequest; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListWorkspacesRequest; + + /** + * Verifies a ListWorkspacesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkspacesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkspacesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListWorkspacesRequest; + + /** + * Creates a plain object from a ListWorkspacesRequest message. Also converts values to other types if specified. + * @param message ListWorkspacesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListWorkspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkspacesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkspacesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListWorkspacesResponse. */ + interface IListWorkspacesResponse { + + /** ListWorkspacesResponse workspaces */ + workspaces?: (google.cloud.dataform.v1beta1.IWorkspace[]|null); + + /** ListWorkspacesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListWorkspacesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListWorkspacesResponse. */ + class ListWorkspacesResponse implements IListWorkspacesResponse { + + /** + * Constructs a new ListWorkspacesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListWorkspacesResponse); + + /** ListWorkspacesResponse workspaces. */ + public workspaces: google.cloud.dataform.v1beta1.IWorkspace[]; + + /** ListWorkspacesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListWorkspacesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListWorkspacesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkspacesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListWorkspacesResponse): google.cloud.dataform.v1beta1.ListWorkspacesResponse; + + /** + * Encodes the specified ListWorkspacesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesResponse.verify|verify} messages. + * @param message ListWorkspacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListWorkspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkspacesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesResponse.verify|verify} messages. + * @param message ListWorkspacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListWorkspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListWorkspacesResponse; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListWorkspacesResponse; + + /** + * Verifies a ListWorkspacesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkspacesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkspacesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListWorkspacesResponse; + + /** + * Creates a plain object from a ListWorkspacesResponse message. Also converts values to other types if specified. + * @param message ListWorkspacesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListWorkspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkspacesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkspacesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetWorkspaceRequest. */ + interface IGetWorkspaceRequest { + + /** GetWorkspaceRequest name */ + name?: (string|null); + } + + /** Represents a GetWorkspaceRequest. */ + class GetWorkspaceRequest implements IGetWorkspaceRequest { + + /** + * Constructs a new GetWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IGetWorkspaceRequest); + + /** GetWorkspaceRequest name. */ + public name: string; + + /** + * Creates a new GetWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IGetWorkspaceRequest): google.cloud.dataform.v1beta1.GetWorkspaceRequest; + + /** + * Encodes the specified GetWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkspaceRequest.verify|verify} messages. + * @param message GetWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IGetWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkspaceRequest.verify|verify} messages. + * @param message GetWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IGetWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.GetWorkspaceRequest; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.GetWorkspaceRequest; + + /** + * Verifies a GetWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.GetWorkspaceRequest; + + /** + * Creates a plain object from a GetWorkspaceRequest message. Also converts values to other types if specified. + * @param message GetWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.GetWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateWorkspaceRequest. */ + interface ICreateWorkspaceRequest { + + /** CreateWorkspaceRequest parent */ + parent?: (string|null); + + /** CreateWorkspaceRequest workspace */ + workspace?: (google.cloud.dataform.v1beta1.IWorkspace|null); + + /** CreateWorkspaceRequest workspaceId */ + workspaceId?: (string|null); + } + + /** Represents a CreateWorkspaceRequest. */ + class CreateWorkspaceRequest implements ICreateWorkspaceRequest { + + /** + * Constructs a new CreateWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest); + + /** CreateWorkspaceRequest parent. */ + public parent: string; + + /** CreateWorkspaceRequest workspace. */ + public workspace?: (google.cloud.dataform.v1beta1.IWorkspace|null); + + /** CreateWorkspaceRequest workspaceId. */ + public workspaceId: string; + + /** + * Creates a new CreateWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest): google.cloud.dataform.v1beta1.CreateWorkspaceRequest; + + /** + * Encodes the specified CreateWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkspaceRequest.verify|verify} messages. + * @param message CreateWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkspaceRequest.verify|verify} messages. + * @param message CreateWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CreateWorkspaceRequest; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CreateWorkspaceRequest; + + /** + * Verifies a CreateWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CreateWorkspaceRequest; + + /** + * Creates a plain object from a CreateWorkspaceRequest message. Also converts values to other types if specified. + * @param message CreateWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CreateWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteWorkspaceRequest. */ + interface IDeleteWorkspaceRequest { + + /** DeleteWorkspaceRequest name */ + name?: (string|null); + } + + /** Represents a DeleteWorkspaceRequest. */ + class DeleteWorkspaceRequest implements IDeleteWorkspaceRequest { + + /** + * Constructs a new DeleteWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest); + + /** DeleteWorkspaceRequest name. */ + public name: string; + + /** + * Creates a new DeleteWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest): google.cloud.dataform.v1beta1.DeleteWorkspaceRequest; + + /** + * Encodes the specified DeleteWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkspaceRequest.verify|verify} messages. + * @param message DeleteWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkspaceRequest.verify|verify} messages. + * @param message DeleteWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.DeleteWorkspaceRequest; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.DeleteWorkspaceRequest; + + /** + * Verifies a DeleteWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.DeleteWorkspaceRequest; + + /** + * Creates a plain object from a DeleteWorkspaceRequest message. Also converts values to other types if specified. + * @param message DeleteWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.DeleteWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommitAuthor. */ + interface ICommitAuthor { + + /** CommitAuthor name */ + name?: (string|null); + + /** CommitAuthor emailAddress */ + emailAddress?: (string|null); + } + + /** Represents a CommitAuthor. */ + class CommitAuthor implements ICommitAuthor { + + /** + * Constructs a new CommitAuthor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICommitAuthor); + + /** CommitAuthor name. */ + public name: string; + + /** CommitAuthor emailAddress. */ + public emailAddress: string; + + /** + * Creates a new CommitAuthor instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitAuthor instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICommitAuthor): google.cloud.dataform.v1beta1.CommitAuthor; + + /** + * Encodes the specified CommitAuthor message. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitAuthor.verify|verify} messages. + * @param message CommitAuthor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICommitAuthor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommitAuthor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitAuthor.verify|verify} messages. + * @param message CommitAuthor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICommitAuthor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CommitAuthor; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CommitAuthor; + + /** + * Verifies a CommitAuthor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommitAuthor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommitAuthor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CommitAuthor; + + /** + * Creates a plain object from a CommitAuthor message. Also converts values to other types if specified. + * @param message CommitAuthor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CommitAuthor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommitAuthor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommitAuthor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PullGitCommitsRequest. */ + interface IPullGitCommitsRequest { + + /** PullGitCommitsRequest name */ + name?: (string|null); + + /** PullGitCommitsRequest remoteBranch */ + remoteBranch?: (string|null); + + /** PullGitCommitsRequest author */ + author?: (google.cloud.dataform.v1beta1.ICommitAuthor|null); + } + + /** Represents a PullGitCommitsRequest. */ + class PullGitCommitsRequest implements IPullGitCommitsRequest { + + /** + * Constructs a new PullGitCommitsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IPullGitCommitsRequest); + + /** PullGitCommitsRequest name. */ + public name: string; + + /** PullGitCommitsRequest remoteBranch. */ + public remoteBranch: string; + + /** PullGitCommitsRequest author. */ + public author?: (google.cloud.dataform.v1beta1.ICommitAuthor|null); + + /** + * Creates a new PullGitCommitsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PullGitCommitsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IPullGitCommitsRequest): google.cloud.dataform.v1beta1.PullGitCommitsRequest; + + /** + * Encodes the specified PullGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.PullGitCommitsRequest.verify|verify} messages. + * @param message PullGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IPullGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.PullGitCommitsRequest.verify|verify} messages. + * @param message PullGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IPullGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.PullGitCommitsRequest; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.PullGitCommitsRequest; + + /** + * Verifies a PullGitCommitsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PullGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullGitCommitsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.PullGitCommitsRequest; + + /** + * Creates a plain object from a PullGitCommitsRequest message. Also converts values to other types if specified. + * @param message PullGitCommitsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.PullGitCommitsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullGitCommitsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PullGitCommitsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PushGitCommitsRequest. */ + interface IPushGitCommitsRequest { + + /** PushGitCommitsRequest name */ + name?: (string|null); + + /** PushGitCommitsRequest remoteBranch */ + remoteBranch?: (string|null); + } + + /** Represents a PushGitCommitsRequest. */ + class PushGitCommitsRequest implements IPushGitCommitsRequest { + + /** + * Constructs a new PushGitCommitsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IPushGitCommitsRequest); + + /** PushGitCommitsRequest name. */ + public name: string; + + /** PushGitCommitsRequest remoteBranch. */ + public remoteBranch: string; + + /** + * Creates a new PushGitCommitsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PushGitCommitsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IPushGitCommitsRequest): google.cloud.dataform.v1beta1.PushGitCommitsRequest; + + /** + * Encodes the specified PushGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.PushGitCommitsRequest.verify|verify} messages. + * @param message PushGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IPushGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.PushGitCommitsRequest.verify|verify} messages. + * @param message PushGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IPushGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.PushGitCommitsRequest; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.PushGitCommitsRequest; + + /** + * Verifies a PushGitCommitsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PushGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushGitCommitsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.PushGitCommitsRequest; + + /** + * Creates a plain object from a PushGitCommitsRequest message. Also converts values to other types if specified. + * @param message PushGitCommitsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.PushGitCommitsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushGitCommitsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PushGitCommitsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchFileGitStatusesRequest. */ + interface IFetchFileGitStatusesRequest { + + /** FetchFileGitStatusesRequest name */ + name?: (string|null); + } + + /** Represents a FetchFileGitStatusesRequest. */ + class FetchFileGitStatusesRequest implements IFetchFileGitStatusesRequest { + + /** + * Constructs a new FetchFileGitStatusesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest); + + /** FetchFileGitStatusesRequest name. */ + public name: string; + + /** + * Creates a new FetchFileGitStatusesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileGitStatusesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest): google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest; + + /** + * Encodes the specified FetchFileGitStatusesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest.verify|verify} messages. + * @param message FetchFileGitStatusesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileGitStatusesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest.verify|verify} messages. + * @param message FetchFileGitStatusesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest; + + /** + * Verifies a FetchFileGitStatusesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileGitStatusesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileGitStatusesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest; + + /** + * Creates a plain object from a FetchFileGitStatusesRequest message. Also converts values to other types if specified. + * @param message FetchFileGitStatusesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileGitStatusesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileGitStatusesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchFileGitStatusesResponse. */ + interface IFetchFileGitStatusesResponse { + + /** FetchFileGitStatusesResponse uncommittedFileChanges */ + uncommittedFileChanges?: (google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange[]|null); + } + + /** Represents a FetchFileGitStatusesResponse. */ + class FetchFileGitStatusesResponse implements IFetchFileGitStatusesResponse { + + /** + * Constructs a new FetchFileGitStatusesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse); + + /** FetchFileGitStatusesResponse uncommittedFileChanges. */ + public uncommittedFileChanges: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange[]; + + /** + * Creates a new FetchFileGitStatusesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileGitStatusesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse; + + /** + * Encodes the specified FetchFileGitStatusesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.verify|verify} messages. + * @param message FetchFileGitStatusesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileGitStatusesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.verify|verify} messages. + * @param message FetchFileGitStatusesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse; + + /** + * Verifies a FetchFileGitStatusesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileGitStatusesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileGitStatusesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse; + + /** + * Creates a plain object from a FetchFileGitStatusesResponse message. Also converts values to other types if specified. + * @param message FetchFileGitStatusesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileGitStatusesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileGitStatusesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FetchFileGitStatusesResponse { + + /** Properties of an UncommittedFileChange. */ + interface IUncommittedFileChange { + + /** UncommittedFileChange path */ + path?: (string|null); + + /** UncommittedFileChange state */ + state?: (google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State|keyof typeof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State|null); + } + + /** Represents an UncommittedFileChange. */ + class UncommittedFileChange implements IUncommittedFileChange { + + /** + * Constructs a new UncommittedFileChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange); + + /** UncommittedFileChange path. */ + public path: string; + + /** UncommittedFileChange state. */ + public state: (google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State|keyof typeof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State); + + /** + * Creates a new UncommittedFileChange instance using the specified properties. + * @param [properties] Properties to set + * @returns UncommittedFileChange instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Encodes the specified UncommittedFileChange message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @param message UncommittedFileChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UncommittedFileChange message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @param message UncommittedFileChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Verifies an UncommittedFileChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UncommittedFileChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UncommittedFileChange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Creates a plain object from an UncommittedFileChange message. Also converts values to other types if specified. + * @param message UncommittedFileChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UncommittedFileChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UncommittedFileChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UncommittedFileChange { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ADDED = 1, + DELETED = 2, + MODIFIED = 3, + HAS_CONFLICTS = 4 + } + } + } + + /** Properties of a FetchGitAheadBehindRequest. */ + interface IFetchGitAheadBehindRequest { + + /** FetchGitAheadBehindRequest name */ + name?: (string|null); + + /** FetchGitAheadBehindRequest remoteBranch */ + remoteBranch?: (string|null); + } + + /** Represents a FetchGitAheadBehindRequest. */ + class FetchGitAheadBehindRequest implements IFetchGitAheadBehindRequest { + + /** + * Constructs a new FetchGitAheadBehindRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest); + + /** FetchGitAheadBehindRequest name. */ + public name: string; + + /** FetchGitAheadBehindRequest remoteBranch. */ + public remoteBranch: string; + + /** + * Creates a new FetchGitAheadBehindRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchGitAheadBehindRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest): google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest; + + /** + * Encodes the specified FetchGitAheadBehindRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest.verify|verify} messages. + * @param message FetchGitAheadBehindRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchGitAheadBehindRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest.verify|verify} messages. + * @param message FetchGitAheadBehindRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest; + + /** + * Verifies a FetchGitAheadBehindRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchGitAheadBehindRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchGitAheadBehindRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest; + + /** + * Creates a plain object from a FetchGitAheadBehindRequest message. Also converts values to other types if specified. + * @param message FetchGitAheadBehindRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchGitAheadBehindRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchGitAheadBehindRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchGitAheadBehindResponse. */ + interface IFetchGitAheadBehindResponse { + + /** FetchGitAheadBehindResponse commitsAhead */ + commitsAhead?: (number|null); + + /** FetchGitAheadBehindResponse commitsBehind */ + commitsBehind?: (number|null); + } + + /** Represents a FetchGitAheadBehindResponse. */ + class FetchGitAheadBehindResponse implements IFetchGitAheadBehindResponse { + + /** + * Constructs a new FetchGitAheadBehindResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse); + + /** FetchGitAheadBehindResponse commitsAhead. */ + public commitsAhead: number; + + /** FetchGitAheadBehindResponse commitsBehind. */ + public commitsBehind: number; + + /** + * Creates a new FetchGitAheadBehindResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchGitAheadBehindResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse): google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse; + + /** + * Encodes the specified FetchGitAheadBehindResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse.verify|verify} messages. + * @param message FetchGitAheadBehindResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchGitAheadBehindResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse.verify|verify} messages. + * @param message FetchGitAheadBehindResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse; + + /** + * Verifies a FetchGitAheadBehindResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchGitAheadBehindResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchGitAheadBehindResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse; + + /** + * Creates a plain object from a FetchGitAheadBehindResponse message. Also converts values to other types if specified. + * @param message FetchGitAheadBehindResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchGitAheadBehindResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchGitAheadBehindResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommitWorkspaceChangesRequest. */ + interface ICommitWorkspaceChangesRequest { + + /** CommitWorkspaceChangesRequest name */ + name?: (string|null); + + /** CommitWorkspaceChangesRequest author */ + author?: (google.cloud.dataform.v1beta1.ICommitAuthor|null); + + /** CommitWorkspaceChangesRequest commitMessage */ + commitMessage?: (string|null); + + /** CommitWorkspaceChangesRequest paths */ + paths?: (string[]|null); + } + + /** Represents a CommitWorkspaceChangesRequest. */ + class CommitWorkspaceChangesRequest implements ICommitWorkspaceChangesRequest { + + /** + * Constructs a new CommitWorkspaceChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest); + + /** CommitWorkspaceChangesRequest name. */ + public name: string; + + /** CommitWorkspaceChangesRequest author. */ + public author?: (google.cloud.dataform.v1beta1.ICommitAuthor|null); + + /** CommitWorkspaceChangesRequest commitMessage. */ + public commitMessage: string; + + /** CommitWorkspaceChangesRequest paths. */ + public paths: string[]; + + /** + * Creates a new CommitWorkspaceChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitWorkspaceChangesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest): google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.verify|verify} messages. + * @param message CommitWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.verify|verify} messages. + * @param message CommitWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest; + + /** + * Verifies a CommitWorkspaceChangesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommitWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommitWorkspaceChangesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest; + + /** + * Creates a plain object from a CommitWorkspaceChangesRequest message. Also converts values to other types if specified. + * @param message CommitWorkspaceChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommitWorkspaceChangesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommitWorkspaceChangesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResetWorkspaceChangesRequest. */ + interface IResetWorkspaceChangesRequest { + + /** ResetWorkspaceChangesRequest name */ + name?: (string|null); + + /** ResetWorkspaceChangesRequest paths */ + paths?: (string[]|null); + + /** ResetWorkspaceChangesRequest clean */ + clean?: (boolean|null); + } + + /** Represents a ResetWorkspaceChangesRequest. */ + class ResetWorkspaceChangesRequest implements IResetWorkspaceChangesRequest { + + /** + * Constructs a new ResetWorkspaceChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest); + + /** ResetWorkspaceChangesRequest name. */ + public name: string; + + /** ResetWorkspaceChangesRequest paths. */ + public paths: string[]; + + /** ResetWorkspaceChangesRequest clean. */ + public clean: boolean; + + /** + * Creates a new ResetWorkspaceChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetWorkspaceChangesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest): google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.verify|verify} messages. + * @param message ResetWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.verify|verify} messages. + * @param message ResetWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest; + + /** + * Verifies a ResetWorkspaceChangesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResetWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetWorkspaceChangesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest; + + /** + * Creates a plain object from a ResetWorkspaceChangesRequest message. Also converts values to other types if specified. + * @param message ResetWorkspaceChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResetWorkspaceChangesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResetWorkspaceChangesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchFileDiffRequest. */ + interface IFetchFileDiffRequest { + + /** FetchFileDiffRequest workspace */ + workspace?: (string|null); + + /** FetchFileDiffRequest path */ + path?: (string|null); + } + + /** Represents a FetchFileDiffRequest. */ + class FetchFileDiffRequest implements IFetchFileDiffRequest { + + /** + * Constructs a new FetchFileDiffRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchFileDiffRequest); + + /** FetchFileDiffRequest workspace. */ + public workspace: string; + + /** FetchFileDiffRequest path. */ + public path: string; + + /** + * Creates a new FetchFileDiffRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileDiffRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchFileDiffRequest): google.cloud.dataform.v1beta1.FetchFileDiffRequest; + + /** + * Encodes the specified FetchFileDiffRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffRequest.verify|verify} messages. + * @param message FetchFileDiffRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchFileDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileDiffRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffRequest.verify|verify} messages. + * @param message FetchFileDiffRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchFileDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileDiffRequest; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileDiffRequest; + + /** + * Verifies a FetchFileDiffRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileDiffRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileDiffRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileDiffRequest; + + /** + * Creates a plain object from a FetchFileDiffRequest message. Also converts values to other types if specified. + * @param message FetchFileDiffRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileDiffRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileDiffRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileDiffRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchFileDiffResponse. */ + interface IFetchFileDiffResponse { + + /** FetchFileDiffResponse formattedDiff */ + formattedDiff?: (string|null); + } + + /** Represents a FetchFileDiffResponse. */ + class FetchFileDiffResponse implements IFetchFileDiffResponse { + + /** + * Constructs a new FetchFileDiffResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchFileDiffResponse); + + /** FetchFileDiffResponse formattedDiff. */ + public formattedDiff: string; + + /** + * Creates a new FetchFileDiffResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileDiffResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchFileDiffResponse): google.cloud.dataform.v1beta1.FetchFileDiffResponse; + + /** + * Encodes the specified FetchFileDiffResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse.verify|verify} messages. + * @param message FetchFileDiffResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchFileDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileDiffResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse.verify|verify} messages. + * @param message FetchFileDiffResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchFileDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileDiffResponse; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileDiffResponse; + + /** + * Verifies a FetchFileDiffResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileDiffResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileDiffResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileDiffResponse; + + /** + * Creates a plain object from a FetchFileDiffResponse message. Also converts values to other types if specified. + * @param message FetchFileDiffResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileDiffResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileDiffResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileDiffResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryDirectoryContentsRequest. */ + interface IQueryDirectoryContentsRequest { + + /** QueryDirectoryContentsRequest workspace */ + workspace?: (string|null); + + /** QueryDirectoryContentsRequest path */ + path?: (string|null); + + /** QueryDirectoryContentsRequest pageSize */ + pageSize?: (number|null); + + /** QueryDirectoryContentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a QueryDirectoryContentsRequest. */ + class QueryDirectoryContentsRequest implements IQueryDirectoryContentsRequest { + + /** + * Constructs a new QueryDirectoryContentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest); + + /** QueryDirectoryContentsRequest workspace. */ + public workspace: string; + + /** QueryDirectoryContentsRequest path. */ + public path: string; + + /** QueryDirectoryContentsRequest pageSize. */ + public pageSize: number; + + /** QueryDirectoryContentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new QueryDirectoryContentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDirectoryContentsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest): google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest; + + /** + * Encodes the specified QueryDirectoryContentsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest.verify|verify} messages. + * @param message QueryDirectoryContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDirectoryContentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest.verify|verify} messages. + * @param message QueryDirectoryContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest; + + /** + * Verifies a QueryDirectoryContentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDirectoryContentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDirectoryContentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest; + + /** + * Creates a plain object from a QueryDirectoryContentsRequest message. Also converts values to other types if specified. + * @param message QueryDirectoryContentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDirectoryContentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryDirectoryContentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryDirectoryContentsResponse. */ + interface IQueryDirectoryContentsResponse { + + /** QueryDirectoryContentsResponse directoryEntries */ + directoryEntries?: (google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[]|null); + + /** QueryDirectoryContentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryDirectoryContentsResponse. */ + class QueryDirectoryContentsResponse implements IQueryDirectoryContentsResponse { + + /** + * Constructs a new QueryDirectoryContentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse); + + /** QueryDirectoryContentsResponse directoryEntries. */ + public directoryEntries: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[]; + + /** QueryDirectoryContentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryDirectoryContentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDirectoryContentsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse; + + /** + * Encodes the specified QueryDirectoryContentsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.verify|verify} messages. + * @param message QueryDirectoryContentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDirectoryContentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.verify|verify} messages. + * @param message QueryDirectoryContentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse; + + /** + * Verifies a QueryDirectoryContentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDirectoryContentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDirectoryContentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse; + + /** + * Creates a plain object from a QueryDirectoryContentsResponse message. Also converts values to other types if specified. + * @param message QueryDirectoryContentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDirectoryContentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryDirectoryContentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QueryDirectoryContentsResponse { + + /** Properties of a DirectoryEntry. */ + interface IDirectoryEntry { + + /** DirectoryEntry file */ + file?: (string|null); + + /** DirectoryEntry directory */ + directory?: (string|null); + } + + /** Represents a DirectoryEntry. */ + class DirectoryEntry implements IDirectoryEntry { + + /** + * Constructs a new DirectoryEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry); + + /** DirectoryEntry file. */ + public file?: (string|null); + + /** DirectoryEntry directory. */ + public directory?: (string|null); + + /** DirectoryEntry entry. */ + public entry?: ("file"|"directory"); + + /** + * Creates a new DirectoryEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns DirectoryEntry instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Encodes the specified DirectoryEntry message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @param message DirectoryEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DirectoryEntry message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @param message DirectoryEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Verifies a DirectoryEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DirectoryEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DirectoryEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Creates a plain object from a DirectoryEntry message. Also converts values to other types if specified. + * @param message DirectoryEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DirectoryEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DirectoryEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a MakeDirectoryRequest. */ + interface IMakeDirectoryRequest { + + /** MakeDirectoryRequest workspace */ + workspace?: (string|null); + + /** MakeDirectoryRequest path */ + path?: (string|null); + } + + /** Represents a MakeDirectoryRequest. */ + class MakeDirectoryRequest implements IMakeDirectoryRequest { + + /** + * Constructs a new MakeDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMakeDirectoryRequest); + + /** MakeDirectoryRequest workspace. */ + public workspace: string; + + /** MakeDirectoryRequest path. */ + public path: string; + + /** + * Creates a new MakeDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MakeDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMakeDirectoryRequest): google.cloud.dataform.v1beta1.MakeDirectoryRequest; + + /** + * Encodes the specified MakeDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryRequest.verify|verify} messages. + * @param message MakeDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMakeDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MakeDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryRequest.verify|verify} messages. + * @param message MakeDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMakeDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MakeDirectoryRequest; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MakeDirectoryRequest; + + /** + * Verifies a MakeDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MakeDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MakeDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MakeDirectoryRequest; + + /** + * Creates a plain object from a MakeDirectoryRequest message. Also converts values to other types if specified. + * @param message MakeDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MakeDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MakeDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MakeDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MakeDirectoryResponse. */ + interface IMakeDirectoryResponse { + } + + /** Represents a MakeDirectoryResponse. */ + class MakeDirectoryResponse implements IMakeDirectoryResponse { + + /** + * Constructs a new MakeDirectoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMakeDirectoryResponse); + + /** + * Creates a new MakeDirectoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MakeDirectoryResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMakeDirectoryResponse): google.cloud.dataform.v1beta1.MakeDirectoryResponse; + + /** + * Encodes the specified MakeDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse.verify|verify} messages. + * @param message MakeDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMakeDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MakeDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse.verify|verify} messages. + * @param message MakeDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMakeDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MakeDirectoryResponse; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MakeDirectoryResponse; + + /** + * Verifies a MakeDirectoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MakeDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MakeDirectoryResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MakeDirectoryResponse; + + /** + * Creates a plain object from a MakeDirectoryResponse message. Also converts values to other types if specified. + * @param message MakeDirectoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MakeDirectoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MakeDirectoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MakeDirectoryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveDirectoryRequest. */ + interface IRemoveDirectoryRequest { + + /** RemoveDirectoryRequest workspace */ + workspace?: (string|null); + + /** RemoveDirectoryRequest path */ + path?: (string|null); + } + + /** Represents a RemoveDirectoryRequest. */ + class RemoveDirectoryRequest implements IRemoveDirectoryRequest { + + /** + * Constructs a new RemoveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest); + + /** RemoveDirectoryRequest workspace. */ + public workspace: string; + + /** RemoveDirectoryRequest path. */ + public path: string; + + /** + * Creates a new RemoveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest): google.cloud.dataform.v1beta1.RemoveDirectoryRequest; + + /** + * Encodes the specified RemoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveDirectoryRequest.verify|verify} messages. + * @param message RemoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveDirectoryRequest.verify|verify} messages. + * @param message RemoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.RemoveDirectoryRequest; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.RemoveDirectoryRequest; + + /** + * Verifies a RemoveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.RemoveDirectoryRequest; + + /** + * Creates a plain object from a RemoveDirectoryRequest message. Also converts values to other types if specified. + * @param message RemoveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.RemoveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MoveDirectoryRequest. */ + interface IMoveDirectoryRequest { + + /** MoveDirectoryRequest workspace */ + workspace?: (string|null); + + /** MoveDirectoryRequest path */ + path?: (string|null); + + /** MoveDirectoryRequest newPath */ + newPath?: (string|null); + } + + /** Represents a MoveDirectoryRequest. */ + class MoveDirectoryRequest implements IMoveDirectoryRequest { + + /** + * Constructs a new MoveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMoveDirectoryRequest); + + /** MoveDirectoryRequest workspace. */ + public workspace: string; + + /** MoveDirectoryRequest path. */ + public path: string; + + /** MoveDirectoryRequest newPath. */ + public newPath: string; + + /** + * Creates a new MoveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMoveDirectoryRequest): google.cloud.dataform.v1beta1.MoveDirectoryRequest; + + /** + * Encodes the specified MoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryRequest.verify|verify} messages. + * @param message MoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryRequest.verify|verify} messages. + * @param message MoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MoveDirectoryRequest; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MoveDirectoryRequest; + + /** + * Verifies a MoveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MoveDirectoryRequest; + + /** + * Creates a plain object from a MoveDirectoryRequest message. Also converts values to other types if specified. + * @param message MoveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MoveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MoveDirectoryResponse. */ + interface IMoveDirectoryResponse { + } + + /** Represents a MoveDirectoryResponse. */ + class MoveDirectoryResponse implements IMoveDirectoryResponse { + + /** + * Constructs a new MoveDirectoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMoveDirectoryResponse); + + /** + * Creates a new MoveDirectoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveDirectoryResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMoveDirectoryResponse): google.cloud.dataform.v1beta1.MoveDirectoryResponse; + + /** + * Encodes the specified MoveDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse.verify|verify} messages. + * @param message MoveDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMoveDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse.verify|verify} messages. + * @param message MoveDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMoveDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MoveDirectoryResponse; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MoveDirectoryResponse; + + /** + * Verifies a MoveDirectoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveDirectoryResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MoveDirectoryResponse; + + /** + * Creates a plain object from a MoveDirectoryResponse message. Also converts values to other types if specified. + * @param message MoveDirectoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MoveDirectoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveDirectoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveDirectoryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReadFileRequest. */ + interface IReadFileRequest { + + /** ReadFileRequest workspace */ + workspace?: (string|null); + + /** ReadFileRequest path */ + path?: (string|null); + } + + /** Represents a ReadFileRequest. */ + class ReadFileRequest implements IReadFileRequest { + + /** + * Constructs a new ReadFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IReadFileRequest); + + /** ReadFileRequest workspace. */ + public workspace: string; + + /** ReadFileRequest path. */ + public path: string; + + /** + * Creates a new ReadFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IReadFileRequest): google.cloud.dataform.v1beta1.ReadFileRequest; + + /** + * Encodes the specified ReadFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileRequest.verify|verify} messages. + * @param message ReadFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IReadFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileRequest.verify|verify} messages. + * @param message ReadFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IReadFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ReadFileRequest; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ReadFileRequest; + + /** + * Verifies a ReadFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ReadFileRequest; + + /** + * Creates a plain object from a ReadFileRequest message. Also converts values to other types if specified. + * @param message ReadFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ReadFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReadFileResponse. */ + interface IReadFileResponse { + + /** ReadFileResponse fileContents */ + fileContents?: (Uint8Array|string|null); + } + + /** Represents a ReadFileResponse. */ + class ReadFileResponse implements IReadFileResponse { + + /** + * Constructs a new ReadFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IReadFileResponse); + + /** ReadFileResponse fileContents. */ + public fileContents: (Uint8Array|string); + + /** + * Creates a new ReadFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IReadFileResponse): google.cloud.dataform.v1beta1.ReadFileResponse; + + /** + * Encodes the specified ReadFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileResponse.verify|verify} messages. + * @param message ReadFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IReadFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileResponse.verify|verify} messages. + * @param message ReadFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IReadFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ReadFileResponse; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ReadFileResponse; + + /** + * Verifies a ReadFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ReadFileResponse; + + /** + * Creates a plain object from a ReadFileResponse message. Also converts values to other types if specified. + * @param message ReadFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ReadFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadFileResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveFileRequest. */ + interface IRemoveFileRequest { + + /** RemoveFileRequest workspace */ + workspace?: (string|null); + + /** RemoveFileRequest path */ + path?: (string|null); + } + + /** Represents a RemoveFileRequest. */ + class RemoveFileRequest implements IRemoveFileRequest { + + /** + * Constructs a new RemoveFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IRemoveFileRequest); + + /** RemoveFileRequest workspace. */ + public workspace: string; + + /** RemoveFileRequest path. */ + public path: string; + + /** + * Creates a new RemoveFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IRemoveFileRequest): google.cloud.dataform.v1beta1.RemoveFileRequest; + + /** + * Encodes the specified RemoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveFileRequest.verify|verify} messages. + * @param message RemoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IRemoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveFileRequest.verify|verify} messages. + * @param message RemoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IRemoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.RemoveFileRequest; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.RemoveFileRequest; + + /** + * Verifies a RemoveFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.RemoveFileRequest; + + /** + * Creates a plain object from a RemoveFileRequest message. Also converts values to other types if specified. + * @param message RemoveFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.RemoveFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MoveFileRequest. */ + interface IMoveFileRequest { + + /** MoveFileRequest workspace */ + workspace?: (string|null); + + /** MoveFileRequest path */ + path?: (string|null); + + /** MoveFileRequest newPath */ + newPath?: (string|null); + } + + /** Represents a MoveFileRequest. */ + class MoveFileRequest implements IMoveFileRequest { + + /** + * Constructs a new MoveFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMoveFileRequest); + + /** MoveFileRequest workspace. */ + public workspace: string; + + /** MoveFileRequest path. */ + public path: string; + + /** MoveFileRequest newPath. */ + public newPath: string; + + /** + * Creates a new MoveFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMoveFileRequest): google.cloud.dataform.v1beta1.MoveFileRequest; + + /** + * Encodes the specified MoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileRequest.verify|verify} messages. + * @param message MoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileRequest.verify|verify} messages. + * @param message MoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MoveFileRequest; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MoveFileRequest; + + /** + * Verifies a MoveFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MoveFileRequest; + + /** + * Creates a plain object from a MoveFileRequest message. Also converts values to other types if specified. + * @param message MoveFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MoveFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MoveFileResponse. */ + interface IMoveFileResponse { + } + + /** Represents a MoveFileResponse. */ + class MoveFileResponse implements IMoveFileResponse { + + /** + * Constructs a new MoveFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMoveFileResponse); + + /** + * Creates a new MoveFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMoveFileResponse): google.cloud.dataform.v1beta1.MoveFileResponse; + + /** + * Encodes the specified MoveFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileResponse.verify|verify} messages. + * @param message MoveFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMoveFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileResponse.verify|verify} messages. + * @param message MoveFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMoveFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MoveFileResponse; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MoveFileResponse; + + /** + * Verifies a MoveFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MoveFileResponse; + + /** + * Creates a plain object from a MoveFileResponse message. Also converts values to other types if specified. + * @param message MoveFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MoveFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveFileResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WriteFileRequest. */ + interface IWriteFileRequest { + + /** WriteFileRequest workspace */ + workspace?: (string|null); + + /** WriteFileRequest path */ + path?: (string|null); + + /** WriteFileRequest contents */ + contents?: (Uint8Array|string|null); + } + + /** Represents a WriteFileRequest. */ + class WriteFileRequest implements IWriteFileRequest { + + /** + * Constructs a new WriteFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWriteFileRequest); + + /** WriteFileRequest workspace. */ + public workspace: string; + + /** WriteFileRequest path. */ + public path: string; + + /** WriteFileRequest contents. */ + public contents: (Uint8Array|string); + + /** + * Creates a new WriteFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWriteFileRequest): google.cloud.dataform.v1beta1.WriteFileRequest; + + /** + * Encodes the specified WriteFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileRequest.verify|verify} messages. + * @param message WriteFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWriteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileRequest.verify|verify} messages. + * @param message WriteFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWriteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WriteFileRequest; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WriteFileRequest; + + /** + * Verifies a WriteFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WriteFileRequest; + + /** + * Creates a plain object from a WriteFileRequest message. Also converts values to other types if specified. + * @param message WriteFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WriteFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WriteFileResponse. */ + interface IWriteFileResponse { + } + + /** Represents a WriteFileResponse. */ + class WriteFileResponse implements IWriteFileResponse { + + /** + * Constructs a new WriteFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWriteFileResponse); + + /** + * Creates a new WriteFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWriteFileResponse): google.cloud.dataform.v1beta1.WriteFileResponse; + + /** + * Encodes the specified WriteFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileResponse.verify|verify} messages. + * @param message WriteFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWriteFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileResponse.verify|verify} messages. + * @param message WriteFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWriteFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WriteFileResponse; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WriteFileResponse; + + /** + * Verifies a WriteFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WriteFileResponse; + + /** + * Creates a plain object from a WriteFileResponse message. Also converts values to other types if specified. + * @param message WriteFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WriteFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteFileResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InstallNpmPackagesRequest. */ + interface IInstallNpmPackagesRequest { + + /** InstallNpmPackagesRequest workspace */ + workspace?: (string|null); + } + + /** Represents an InstallNpmPackagesRequest. */ + class InstallNpmPackagesRequest implements IInstallNpmPackagesRequest { + + /** + * Constructs a new InstallNpmPackagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest); + + /** InstallNpmPackagesRequest workspace. */ + public workspace: string; + + /** + * Creates a new InstallNpmPackagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InstallNpmPackagesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest): google.cloud.dataform.v1beta1.InstallNpmPackagesRequest; + + /** + * Encodes the specified InstallNpmPackagesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesRequest.verify|verify} messages. + * @param message InstallNpmPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstallNpmPackagesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesRequest.verify|verify} messages. + * @param message InstallNpmPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.InstallNpmPackagesRequest; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.InstallNpmPackagesRequest; + + /** + * Verifies an InstallNpmPackagesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstallNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstallNpmPackagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.InstallNpmPackagesRequest; + + /** + * Creates a plain object from an InstallNpmPackagesRequest message. Also converts values to other types if specified. + * @param message InstallNpmPackagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.InstallNpmPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstallNpmPackagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstallNpmPackagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InstallNpmPackagesResponse. */ + interface IInstallNpmPackagesResponse { + } + + /** Represents an InstallNpmPackagesResponse. */ + class InstallNpmPackagesResponse implements IInstallNpmPackagesResponse { + + /** + * Constructs a new InstallNpmPackagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse); + + /** + * Creates a new InstallNpmPackagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns InstallNpmPackagesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse): google.cloud.dataform.v1beta1.InstallNpmPackagesResponse; + + /** + * Encodes the specified InstallNpmPackagesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse.verify|verify} messages. + * @param message InstallNpmPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstallNpmPackagesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse.verify|verify} messages. + * @param message InstallNpmPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.InstallNpmPackagesResponse; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.InstallNpmPackagesResponse; + + /** + * Verifies an InstallNpmPackagesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstallNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstallNpmPackagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.InstallNpmPackagesResponse; + + /** + * Creates a plain object from an InstallNpmPackagesResponse message. Also converts values to other types if specified. + * @param message InstallNpmPackagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.InstallNpmPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstallNpmPackagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstallNpmPackagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompilationResult. */ + interface ICompilationResult { + + /** CompilationResult name */ + name?: (string|null); + + /** CompilationResult gitCommitish */ + gitCommitish?: (string|null); + + /** CompilationResult workspace */ + workspace?: (string|null); + + /** CompilationResult codeCompilationConfig */ + codeCompilationConfig?: (google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig|null); + + /** CompilationResult dataformCoreVersion */ + dataformCoreVersion?: (string|null); + + /** CompilationResult compilationErrors */ + compilationErrors?: (google.cloud.dataform.v1beta1.CompilationResult.ICompilationError[]|null); + } + + /** Represents a CompilationResult. */ + class CompilationResult implements ICompilationResult { + + /** + * Constructs a new CompilationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICompilationResult); + + /** CompilationResult name. */ + public name: string; + + /** CompilationResult gitCommitish. */ + public gitCommitish?: (string|null); + + /** CompilationResult workspace. */ + public workspace?: (string|null); + + /** CompilationResult codeCompilationConfig. */ + public codeCompilationConfig?: (google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig|null); + + /** CompilationResult dataformCoreVersion. */ + public dataformCoreVersion: string; + + /** CompilationResult compilationErrors. */ + public compilationErrors: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError[]; + + /** CompilationResult source. */ + public source?: ("gitCommitish"|"workspace"); + + /** + * Creates a new CompilationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationResult instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICompilationResult): google.cloud.dataform.v1beta1.CompilationResult; + + /** + * Encodes the specified CompilationResult message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.verify|verify} messages. + * @param message CompilationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICompilationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationResult message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.verify|verify} messages. + * @param message CompilationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICompilationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResult; + + /** + * Decodes a CompilationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResult; + + /** + * Verifies a CompilationResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResult; + + /** + * Creates a plain object from a CompilationResult message. Also converts values to other types if specified. + * @param message CompilationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompilationResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CompilationResult { + + /** Properties of a CodeCompilationConfig. */ + interface ICodeCompilationConfig { + + /** CodeCompilationConfig defaultDatabase */ + defaultDatabase?: (string|null); + + /** CodeCompilationConfig defaultSchema */ + defaultSchema?: (string|null); + + /** CodeCompilationConfig defaultLocation */ + defaultLocation?: (string|null); + + /** CodeCompilationConfig assertionSchema */ + assertionSchema?: (string|null); + + /** CodeCompilationConfig vars */ + vars?: ({ [k: string]: string }|null); + + /** CodeCompilationConfig databaseSuffix */ + databaseSuffix?: (string|null); + + /** CodeCompilationConfig schemaSuffix */ + schemaSuffix?: (string|null); + + /** CodeCompilationConfig tablePrefix */ + tablePrefix?: (string|null); + } + + /** Represents a CodeCompilationConfig. */ + class CodeCompilationConfig implements ICodeCompilationConfig { + + /** + * Constructs a new CodeCompilationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig); + + /** CodeCompilationConfig defaultDatabase. */ + public defaultDatabase: string; + + /** CodeCompilationConfig defaultSchema. */ + public defaultSchema: string; + + /** CodeCompilationConfig defaultLocation. */ + public defaultLocation: string; + + /** CodeCompilationConfig assertionSchema. */ + public assertionSchema: string; + + /** CodeCompilationConfig vars. */ + public vars: { [k: string]: string }; + + /** CodeCompilationConfig databaseSuffix. */ + public databaseSuffix: string; + + /** CodeCompilationConfig schemaSuffix. */ + public schemaSuffix: string; + + /** CodeCompilationConfig tablePrefix. */ + public tablePrefix: string; + + /** + * Creates a new CodeCompilationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CodeCompilationConfig instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig): google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig; + + /** + * Encodes the specified CodeCompilationConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @param message CodeCompilationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CodeCompilationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @param message CodeCompilationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig; + + /** + * Verifies a CodeCompilationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CodeCompilationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CodeCompilationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig; + + /** + * Creates a plain object from a CodeCompilationConfig message. Also converts values to other types if specified. + * @param message CodeCompilationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CodeCompilationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CodeCompilationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompilationError. */ + interface ICompilationError { + + /** CompilationError message */ + message?: (string|null); + + /** CompilationError stack */ + stack?: (string|null); + + /** CompilationError path */ + path?: (string|null); + + /** CompilationError actionTarget */ + actionTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + } + + /** Represents a CompilationError. */ + class CompilationError implements ICompilationError { + + /** + * Constructs a new CompilationError. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError); + + /** CompilationError message. */ + public message: string; + + /** CompilationError stack. */ + public stack: string; + + /** CompilationError path. */ + public path: string; + + /** CompilationError actionTarget. */ + public actionTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** + * Creates a new CompilationError instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationError instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError): google.cloud.dataform.v1beta1.CompilationResult.CompilationError; + + /** + * Encodes the specified CompilationError message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify|verify} messages. + * @param message CompilationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationError message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify|verify} messages. + * @param message CompilationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResult.CompilationError; + + /** + * Decodes a CompilationError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResult.CompilationError; + + /** + * Verifies a CompilationError message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationError + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResult.CompilationError; + + /** + * Creates a plain object from a CompilationError message. Also converts values to other types if specified. + * @param message CompilationError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResult.CompilationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompilationError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ListCompilationResultsRequest. */ + interface IListCompilationResultsRequest { + + /** ListCompilationResultsRequest parent */ + parent?: (string|null); + + /** ListCompilationResultsRequest pageSize */ + pageSize?: (number|null); + + /** ListCompilationResultsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListCompilationResultsRequest. */ + class ListCompilationResultsRequest implements IListCompilationResultsRequest { + + /** + * Constructs a new ListCompilationResultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListCompilationResultsRequest); + + /** ListCompilationResultsRequest parent. */ + public parent: string; + + /** ListCompilationResultsRequest pageSize. */ + public pageSize: number; + + /** ListCompilationResultsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListCompilationResultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCompilationResultsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListCompilationResultsRequest): google.cloud.dataform.v1beta1.ListCompilationResultsRequest; + + /** + * Encodes the specified ListCompilationResultsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsRequest.verify|verify} messages. + * @param message ListCompilationResultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListCompilationResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCompilationResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsRequest.verify|verify} messages. + * @param message ListCompilationResultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListCompilationResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListCompilationResultsRequest; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListCompilationResultsRequest; + + /** + * Verifies a ListCompilationResultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCompilationResultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCompilationResultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListCompilationResultsRequest; + + /** + * Creates a plain object from a ListCompilationResultsRequest message. Also converts values to other types if specified. + * @param message ListCompilationResultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListCompilationResultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCompilationResultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCompilationResultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCompilationResultsResponse. */ + interface IListCompilationResultsResponse { + + /** ListCompilationResultsResponse compilationResults */ + compilationResults?: (google.cloud.dataform.v1beta1.ICompilationResult[]|null); + + /** ListCompilationResultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCompilationResultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCompilationResultsResponse. */ + class ListCompilationResultsResponse implements IListCompilationResultsResponse { + + /** + * Constructs a new ListCompilationResultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListCompilationResultsResponse); + + /** ListCompilationResultsResponse compilationResults. */ + public compilationResults: google.cloud.dataform.v1beta1.ICompilationResult[]; + + /** ListCompilationResultsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCompilationResultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCompilationResultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCompilationResultsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListCompilationResultsResponse): google.cloud.dataform.v1beta1.ListCompilationResultsResponse; + + /** + * Encodes the specified ListCompilationResultsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsResponse.verify|verify} messages. + * @param message ListCompilationResultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListCompilationResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCompilationResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsResponse.verify|verify} messages. + * @param message ListCompilationResultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListCompilationResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListCompilationResultsResponse; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListCompilationResultsResponse; + + /** + * Verifies a ListCompilationResultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCompilationResultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCompilationResultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListCompilationResultsResponse; + + /** + * Creates a plain object from a ListCompilationResultsResponse message. Also converts values to other types if specified. + * @param message ListCompilationResultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListCompilationResultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCompilationResultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCompilationResultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetCompilationResultRequest. */ + interface IGetCompilationResultRequest { + + /** GetCompilationResultRequest name */ + name?: (string|null); + } + + /** Represents a GetCompilationResultRequest. */ + class GetCompilationResultRequest implements IGetCompilationResultRequest { + + /** + * Constructs a new GetCompilationResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IGetCompilationResultRequest); + + /** GetCompilationResultRequest name. */ + public name: string; + + /** + * Creates a new GetCompilationResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCompilationResultRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IGetCompilationResultRequest): google.cloud.dataform.v1beta1.GetCompilationResultRequest; + + /** + * Encodes the specified GetCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetCompilationResultRequest.verify|verify} messages. + * @param message GetCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IGetCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetCompilationResultRequest.verify|verify} messages. + * @param message GetCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IGetCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.GetCompilationResultRequest; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.GetCompilationResultRequest; + + /** + * Verifies a GetCompilationResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCompilationResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.GetCompilationResultRequest; + + /** + * Creates a plain object from a GetCompilationResultRequest message. Also converts values to other types if specified. + * @param message GetCompilationResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.GetCompilationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCompilationResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCompilationResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateCompilationResultRequest. */ + interface ICreateCompilationResultRequest { + + /** CreateCompilationResultRequest parent */ + parent?: (string|null); + + /** CreateCompilationResultRequest compilationResult */ + compilationResult?: (google.cloud.dataform.v1beta1.ICompilationResult|null); + } + + /** Represents a CreateCompilationResultRequest. */ + class CreateCompilationResultRequest implements ICreateCompilationResultRequest { + + /** + * Constructs a new CreateCompilationResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest); + + /** CreateCompilationResultRequest parent. */ + public parent: string; + + /** CreateCompilationResultRequest compilationResult. */ + public compilationResult?: (google.cloud.dataform.v1beta1.ICompilationResult|null); + + /** + * Creates a new CreateCompilationResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCompilationResultRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest): google.cloud.dataform.v1beta1.CreateCompilationResultRequest; + + /** + * Encodes the specified CreateCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateCompilationResultRequest.verify|verify} messages. + * @param message CreateCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateCompilationResultRequest.verify|verify} messages. + * @param message CreateCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CreateCompilationResultRequest; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CreateCompilationResultRequest; + + /** + * Verifies a CreateCompilationResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCompilationResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CreateCompilationResultRequest; + + /** + * Creates a plain object from a CreateCompilationResultRequest message. Also converts values to other types if specified. + * @param message CreateCompilationResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CreateCompilationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCompilationResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCompilationResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Target. */ + interface ITarget { + + /** Target database */ + database?: (string|null); + + /** Target schema */ + schema?: (string|null); + + /** Target name */ + name?: (string|null); + } + + /** Represents a Target. */ + class Target implements ITarget { + + /** + * Constructs a new Target. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ITarget); + + /** Target database. */ + public database: string; + + /** Target schema. */ + public schema: string; + + /** Target name. */ + public name: string; + + /** + * Creates a new Target instance using the specified properties. + * @param [properties] Properties to set + * @returns Target instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ITarget): google.cloud.dataform.v1beta1.Target; + + /** + * Encodes the specified Target message. Does not implicitly {@link google.cloud.dataform.v1beta1.Target.verify|verify} messages. + * @param message Target message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Target.verify|verify} messages. + * @param message Target message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Target message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.Target; + + /** + * Decodes a Target message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.Target; + + /** + * Verifies a Target message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Target message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Target + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.Target; + + /** + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @param message Target + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.Target, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Target to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Target + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RelationDescriptor. */ + interface IRelationDescriptor { + + /** RelationDescriptor description */ + description?: (string|null); + + /** RelationDescriptor columns */ + columns?: (google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor[]|null); + + /** RelationDescriptor bigqueryLabels */ + bigqueryLabels?: ({ [k: string]: string }|null); + } + + /** Represents a RelationDescriptor. */ + class RelationDescriptor implements IRelationDescriptor { + + /** + * Constructs a new RelationDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IRelationDescriptor); + + /** RelationDescriptor description. */ + public description: string; + + /** RelationDescriptor columns. */ + public columns: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor[]; + + /** RelationDescriptor bigqueryLabels. */ + public bigqueryLabels: { [k: string]: string }; + + /** + * Creates a new RelationDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns RelationDescriptor instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IRelationDescriptor): google.cloud.dataform.v1beta1.RelationDescriptor; + + /** + * Encodes the specified RelationDescriptor message. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.verify|verify} messages. + * @param message RelationDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IRelationDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RelationDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.verify|verify} messages. + * @param message RelationDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IRelationDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.RelationDescriptor; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.RelationDescriptor; + + /** + * Verifies a RelationDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RelationDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RelationDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.RelationDescriptor; + + /** + * Creates a plain object from a RelationDescriptor message. Also converts values to other types if specified. + * @param message RelationDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.RelationDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RelationDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RelationDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RelationDescriptor { + + /** Properties of a ColumnDescriptor. */ + interface IColumnDescriptor { + + /** ColumnDescriptor path */ + path?: (string[]|null); + + /** ColumnDescriptor description */ + description?: (string|null); + + /** ColumnDescriptor bigqueryPolicyTags */ + bigqueryPolicyTags?: (string[]|null); + } + + /** Represents a ColumnDescriptor. */ + class ColumnDescriptor implements IColumnDescriptor { + + /** + * Constructs a new ColumnDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor); + + /** ColumnDescriptor path. */ + public path: string[]; + + /** ColumnDescriptor description. */ + public description: string; + + /** ColumnDescriptor bigqueryPolicyTags. */ + public bigqueryPolicyTags: string[]; + + /** + * Creates a new ColumnDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnDescriptor instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor): google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor; + + /** + * Encodes the specified ColumnDescriptor message. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @param message ColumnDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ColumnDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @param message ColumnDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor; + + /** + * Verifies a ColumnDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ColumnDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor; + + /** + * Creates a plain object from a ColumnDescriptor message. Also converts values to other types if specified. + * @param message ColumnDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ColumnDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ColumnDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CompilationResultAction. */ + interface ICompilationResultAction { + + /** CompilationResultAction target */ + target?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** CompilationResultAction canonicalTarget */ + canonicalTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** CompilationResultAction filePath */ + filePath?: (string|null); + + /** CompilationResultAction relation */ + relation?: (google.cloud.dataform.v1beta1.CompilationResultAction.IRelation|null); + + /** CompilationResultAction operations */ + operations?: (google.cloud.dataform.v1beta1.CompilationResultAction.IOperations|null); + + /** CompilationResultAction assertion */ + assertion?: (google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion|null); + + /** CompilationResultAction declaration */ + declaration?: (google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration|null); + } + + /** Represents a CompilationResultAction. */ + class CompilationResultAction implements ICompilationResultAction { + + /** + * Constructs a new CompilationResultAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICompilationResultAction); + + /** CompilationResultAction target. */ + public target?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** CompilationResultAction canonicalTarget. */ + public canonicalTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** CompilationResultAction filePath. */ + public filePath: string; + + /** CompilationResultAction relation. */ + public relation?: (google.cloud.dataform.v1beta1.CompilationResultAction.IRelation|null); + + /** CompilationResultAction operations. */ + public operations?: (google.cloud.dataform.v1beta1.CompilationResultAction.IOperations|null); + + /** CompilationResultAction assertion. */ + public assertion?: (google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion|null); + + /** CompilationResultAction declaration. */ + public declaration?: (google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration|null); + + /** CompilationResultAction compiledObject. */ + public compiledObject?: ("relation"|"operations"|"assertion"|"declaration"); + + /** + * Creates a new CompilationResultAction instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationResultAction instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICompilationResultAction): google.cloud.dataform.v1beta1.CompilationResultAction; + + /** + * Encodes the specified CompilationResultAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.verify|verify} messages. + * @param message CompilationResultAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICompilationResultAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationResultAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.verify|verify} messages. + * @param message CompilationResultAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICompilationResultAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction; + + /** + * Verifies a CompilationResultAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationResultAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationResultAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction; + + /** + * Creates a plain object from a CompilationResultAction message. Also converts values to other types if specified. + * @param message CompilationResultAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationResultAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompilationResultAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CompilationResultAction { + + /** Properties of a Relation. */ + interface IRelation { + + /** Relation dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1beta1.ITarget[]|null); + + /** Relation disabled */ + disabled?: (boolean|null); + + /** Relation tags */ + tags?: (string[]|null); + + /** Relation relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** Relation relationType */ + relationType?: (google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType|keyof typeof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType|null); + + /** Relation selectQuery */ + selectQuery?: (string|null); + + /** Relation preOperations */ + preOperations?: (string[]|null); + + /** Relation postOperations */ + postOperations?: (string[]|null); + + /** Relation incrementalTableConfig */ + incrementalTableConfig?: (google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig|null); + + /** Relation partitionExpression */ + partitionExpression?: (string|null); + + /** Relation clusterExpressions */ + clusterExpressions?: (string[]|null); + + /** Relation partitionExpirationDays */ + partitionExpirationDays?: (number|null); + + /** Relation requirePartitionFilter */ + requirePartitionFilter?: (boolean|null); + + /** Relation additionalOptions */ + additionalOptions?: ({ [k: string]: string }|null); + } + + /** Represents a Relation. */ + class Relation implements IRelation { + + /** + * Constructs a new Relation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IRelation); + + /** Relation dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1beta1.ITarget[]; + + /** Relation disabled. */ + public disabled: boolean; + + /** Relation tags. */ + public tags: string[]; + + /** Relation relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** Relation relationType. */ + public relationType: (google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType|keyof typeof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType); + + /** Relation selectQuery. */ + public selectQuery: string; + + /** Relation preOperations. */ + public preOperations: string[]; + + /** Relation postOperations. */ + public postOperations: string[]; + + /** Relation incrementalTableConfig. */ + public incrementalTableConfig?: (google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig|null); + + /** Relation partitionExpression. */ + public partitionExpression: string; + + /** Relation clusterExpressions. */ + public clusterExpressions: string[]; + + /** Relation partitionExpirationDays. */ + public partitionExpirationDays: number; + + /** Relation requirePartitionFilter. */ + public requirePartitionFilter: boolean; + + /** Relation additionalOptions. */ + public additionalOptions: { [k: string]: string }; + + /** + * Creates a new Relation instance using the specified properties. + * @param [properties] Properties to set + * @returns Relation instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IRelation): google.cloud.dataform.v1beta1.CompilationResultAction.Relation; + + /** + * Encodes the specified Relation message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify|verify} messages. + * @param message Relation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.IRelation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Relation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify|verify} messages. + * @param message Relation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.IRelation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Relation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Relation; + + /** + * Decodes a Relation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Relation; + + /** + * Verifies a Relation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Relation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Relation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Relation; + + /** + * Creates a plain object from a Relation message. Also converts values to other types if specified. + * @param message Relation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Relation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Relation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Relation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Relation { + + /** RelationType enum. */ + enum RelationType { + RELATION_TYPE_UNSPECIFIED = 0, + TABLE = 1, + VIEW = 2, + INCREMENTAL_TABLE = 3, + MATERIALIZED_VIEW = 4 + } + + /** Properties of an IncrementalTableConfig. */ + interface IIncrementalTableConfig { + + /** IncrementalTableConfig incrementalSelectQuery */ + incrementalSelectQuery?: (string|null); + + /** IncrementalTableConfig refreshDisabled */ + refreshDisabled?: (boolean|null); + + /** IncrementalTableConfig uniqueKeyParts */ + uniqueKeyParts?: (string[]|null); + + /** IncrementalTableConfig updatePartitionFilter */ + updatePartitionFilter?: (string|null); + + /** IncrementalTableConfig incrementalPreOperations */ + incrementalPreOperations?: (string[]|null); + + /** IncrementalTableConfig incrementalPostOperations */ + incrementalPostOperations?: (string[]|null); + } + + /** Represents an IncrementalTableConfig. */ + class IncrementalTableConfig implements IIncrementalTableConfig { + + /** + * Constructs a new IncrementalTableConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig); + + /** IncrementalTableConfig incrementalSelectQuery. */ + public incrementalSelectQuery: string; + + /** IncrementalTableConfig refreshDisabled. */ + public refreshDisabled: boolean; + + /** IncrementalTableConfig uniqueKeyParts. */ + public uniqueKeyParts: string[]; + + /** IncrementalTableConfig updatePartitionFilter. */ + public updatePartitionFilter: string; + + /** IncrementalTableConfig incrementalPreOperations. */ + public incrementalPreOperations: string[]; + + /** IncrementalTableConfig incrementalPostOperations. */ + public incrementalPostOperations: string[]; + + /** + * Creates a new IncrementalTableConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IncrementalTableConfig instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig): google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Encodes the specified IncrementalTableConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @param message IncrementalTableConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IncrementalTableConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @param message IncrementalTableConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Verifies an IncrementalTableConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IncrementalTableConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IncrementalTableConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Creates a plain object from an IncrementalTableConfig message. Also converts values to other types if specified. + * @param message IncrementalTableConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IncrementalTableConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IncrementalTableConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an Operations. */ + interface IOperations { + + /** Operations dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1beta1.ITarget[]|null); + + /** Operations disabled */ + disabled?: (boolean|null); + + /** Operations tags */ + tags?: (string[]|null); + + /** Operations relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** Operations queries */ + queries?: (string[]|null); + + /** Operations hasOutput */ + hasOutput?: (boolean|null); + } + + /** Represents an Operations. */ + class Operations implements IOperations { + + /** + * Constructs a new Operations. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IOperations); + + /** Operations dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1beta1.ITarget[]; + + /** Operations disabled. */ + public disabled: boolean; + + /** Operations tags. */ + public tags: string[]; + + /** Operations relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** Operations queries. */ + public queries: string[]; + + /** Operations hasOutput. */ + public hasOutput: boolean; + + /** + * Creates a new Operations instance using the specified properties. + * @param [properties] Properties to set + * @returns Operations instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IOperations): google.cloud.dataform.v1beta1.CompilationResultAction.Operations; + + /** + * Encodes the specified Operations message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify|verify} messages. + * @param message Operations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.IOperations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operations message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify|verify} messages. + * @param message Operations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.IOperations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operations message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Operations; + + /** + * Decodes an Operations message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Operations; + + /** + * Verifies an Operations message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operations message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operations + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Operations; + + /** + * Creates a plain object from an Operations message. Also converts values to other types if specified. + * @param message Operations + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Operations, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operations to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operations + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Assertion. */ + interface IAssertion { + + /** Assertion dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1beta1.ITarget[]|null); + + /** Assertion parentAction */ + parentAction?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** Assertion disabled */ + disabled?: (boolean|null); + + /** Assertion tags */ + tags?: (string[]|null); + + /** Assertion selectQuery */ + selectQuery?: (string|null); + + /** Assertion relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + } + + /** Represents an Assertion. */ + class Assertion implements IAssertion { + + /** + * Constructs a new Assertion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion); + + /** Assertion dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1beta1.ITarget[]; + + /** Assertion parentAction. */ + public parentAction?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** Assertion disabled. */ + public disabled: boolean; + + /** Assertion tags. */ + public tags: string[]; + + /** Assertion selectQuery. */ + public selectQuery: string; + + /** Assertion relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** + * Creates a new Assertion instance using the specified properties. + * @param [properties] Properties to set + * @returns Assertion instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion): google.cloud.dataform.v1beta1.CompilationResultAction.Assertion; + + /** + * Encodes the specified Assertion message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify|verify} messages. + * @param message Assertion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Assertion message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify|verify} messages. + * @param message Assertion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Assertion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Assertion; + + /** + * Decodes an Assertion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Assertion; + + /** + * Verifies an Assertion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Assertion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Assertion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Assertion; + + /** + * Creates a plain object from an Assertion message. Also converts values to other types if specified. + * @param message Assertion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Assertion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Assertion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Assertion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration); + + /** Declaration relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration): google.cloud.dataform.v1beta1.CompilationResultAction.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a QueryCompilationResultActionsRequest. */ + interface IQueryCompilationResultActionsRequest { + + /** QueryCompilationResultActionsRequest name */ + name?: (string|null); + + /** QueryCompilationResultActionsRequest pageSize */ + pageSize?: (number|null); + + /** QueryCompilationResultActionsRequest pageToken */ + pageToken?: (string|null); + + /** QueryCompilationResultActionsRequest filter */ + filter?: (string|null); + } + + /** Represents a QueryCompilationResultActionsRequest. */ + class QueryCompilationResultActionsRequest implements IQueryCompilationResultActionsRequest { + + /** + * Constructs a new QueryCompilationResultActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest); + + /** QueryCompilationResultActionsRequest name. */ + public name: string; + + /** QueryCompilationResultActionsRequest pageSize. */ + public pageSize: number; + + /** QueryCompilationResultActionsRequest pageToken. */ + public pageToken: string; + + /** QueryCompilationResultActionsRequest filter. */ + public filter: string; + + /** + * Creates a new QueryCompilationResultActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCompilationResultActionsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest): google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest.verify|verify} messages. + * @param message QueryCompilationResultActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest.verify|verify} messages. + * @param message QueryCompilationResultActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest; + + /** + * Verifies a QueryCompilationResultActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryCompilationResultActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryCompilationResultActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest; + + /** + * Creates a plain object from a QueryCompilationResultActionsRequest message. Also converts values to other types if specified. + * @param message QueryCompilationResultActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryCompilationResultActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryCompilationResultActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryCompilationResultActionsResponse. */ + interface IQueryCompilationResultActionsResponse { + + /** QueryCompilationResultActionsResponse compilationResultActions */ + compilationResultActions?: (google.cloud.dataform.v1beta1.ICompilationResultAction[]|null); + + /** QueryCompilationResultActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryCompilationResultActionsResponse. */ + class QueryCompilationResultActionsResponse implements IQueryCompilationResultActionsResponse { + + /** + * Constructs a new QueryCompilationResultActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse); + + /** QueryCompilationResultActionsResponse compilationResultActions. */ + public compilationResultActions: google.cloud.dataform.v1beta1.ICompilationResultAction[]; + + /** QueryCompilationResultActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryCompilationResultActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCompilationResultActionsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse): google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.verify|verify} messages. + * @param message QueryCompilationResultActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.verify|verify} messages. + * @param message QueryCompilationResultActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse; + + /** + * Verifies a QueryCompilationResultActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryCompilationResultActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryCompilationResultActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse; + + /** + * Creates a plain object from a QueryCompilationResultActionsResponse message. Also converts values to other types if specified. + * @param message QueryCompilationResultActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryCompilationResultActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryCompilationResultActionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkflowInvocation. */ + interface IWorkflowInvocation { + + /** WorkflowInvocation name */ + name?: (string|null); + + /** WorkflowInvocation compilationResult */ + compilationResult?: (string|null); + + /** WorkflowInvocation invocationConfig */ + invocationConfig?: (google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig|null); + + /** WorkflowInvocation state */ + state?: (google.cloud.dataform.v1beta1.WorkflowInvocation.State|keyof typeof google.cloud.dataform.v1beta1.WorkflowInvocation.State|null); + + /** WorkflowInvocation invocationTiming */ + invocationTiming?: (google.type.IInterval|null); + } + + /** Represents a WorkflowInvocation. */ + class WorkflowInvocation implements IWorkflowInvocation { + + /** + * Constructs a new WorkflowInvocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWorkflowInvocation); + + /** WorkflowInvocation name. */ + public name: string; + + /** WorkflowInvocation compilationResult. */ + public compilationResult: string; + + /** WorkflowInvocation invocationConfig. */ + public invocationConfig?: (google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig|null); + + /** WorkflowInvocation state. */ + public state: (google.cloud.dataform.v1beta1.WorkflowInvocation.State|keyof typeof google.cloud.dataform.v1beta1.WorkflowInvocation.State); + + /** WorkflowInvocation invocationTiming. */ + public invocationTiming?: (google.type.IInterval|null); + + /** + * Creates a new WorkflowInvocation instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowInvocation instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWorkflowInvocation): google.cloud.dataform.v1beta1.WorkflowInvocation; + + /** + * Encodes the specified WorkflowInvocation message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.verify|verify} messages. + * @param message WorkflowInvocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWorkflowInvocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowInvocation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.verify|verify} messages. + * @param message WorkflowInvocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWorkflowInvocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WorkflowInvocation; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WorkflowInvocation; + + /** + * Verifies a WorkflowInvocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkflowInvocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowInvocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WorkflowInvocation; + + /** + * Creates a plain object from a WorkflowInvocation message. Also converts values to other types if specified. + * @param message WorkflowInvocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WorkflowInvocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowInvocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkflowInvocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WorkflowInvocation { + + /** Properties of an InvocationConfig. */ + interface IInvocationConfig { + + /** InvocationConfig includedTargets */ + includedTargets?: (google.cloud.dataform.v1beta1.ITarget[]|null); + + /** InvocationConfig includedTags */ + includedTags?: (string[]|null); + + /** InvocationConfig transitiveDependenciesIncluded */ + transitiveDependenciesIncluded?: (boolean|null); + + /** InvocationConfig transitiveDependentsIncluded */ + transitiveDependentsIncluded?: (boolean|null); + + /** InvocationConfig fullyRefreshIncrementalTablesEnabled */ + fullyRefreshIncrementalTablesEnabled?: (boolean|null); + } + + /** Represents an InvocationConfig. */ + class InvocationConfig implements IInvocationConfig { + + /** + * Constructs a new InvocationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig); + + /** InvocationConfig includedTargets. */ + public includedTargets: google.cloud.dataform.v1beta1.ITarget[]; + + /** InvocationConfig includedTags. */ + public includedTags: string[]; + + /** InvocationConfig transitiveDependenciesIncluded. */ + public transitiveDependenciesIncluded: boolean; + + /** InvocationConfig transitiveDependentsIncluded. */ + public transitiveDependentsIncluded: boolean; + + /** InvocationConfig fullyRefreshIncrementalTablesEnabled. */ + public fullyRefreshIncrementalTablesEnabled: boolean; + + /** + * Creates a new InvocationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns InvocationConfig instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig): google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig; + + /** + * Encodes the specified InvocationConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @param message InvocationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvocationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @param message InvocationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig; + + /** + * Verifies an InvocationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InvocationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvocationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig; + + /** + * Creates a plain object from an InvocationConfig message. Also converts values to other types if specified. + * @param message InvocationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvocationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InvocationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + CANCELLED = 3, + FAILED = 4, + CANCELING = 5 + } + } + + /** Properties of a ListWorkflowInvocationsRequest. */ + interface IListWorkflowInvocationsRequest { + + /** ListWorkflowInvocationsRequest parent */ + parent?: (string|null); + + /** ListWorkflowInvocationsRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkflowInvocationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListWorkflowInvocationsRequest. */ + class ListWorkflowInvocationsRequest implements IListWorkflowInvocationsRequest { + + /** + * Constructs a new ListWorkflowInvocationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest); + + /** ListWorkflowInvocationsRequest parent. */ + public parent: string; + + /** ListWorkflowInvocationsRequest pageSize. */ + public pageSize: number; + + /** ListWorkflowInvocationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListWorkflowInvocationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkflowInvocationsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest): google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest.verify|verify} messages. + * @param message ListWorkflowInvocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest.verify|verify} messages. + * @param message ListWorkflowInvocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest; + + /** + * Verifies a ListWorkflowInvocationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkflowInvocationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkflowInvocationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest; + + /** + * Creates a plain object from a ListWorkflowInvocationsRequest message. Also converts values to other types if specified. + * @param message ListWorkflowInvocationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkflowInvocationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkflowInvocationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListWorkflowInvocationsResponse. */ + interface IListWorkflowInvocationsResponse { + + /** ListWorkflowInvocationsResponse workflowInvocations */ + workflowInvocations?: (google.cloud.dataform.v1beta1.IWorkflowInvocation[]|null); + + /** ListWorkflowInvocationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListWorkflowInvocationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListWorkflowInvocationsResponse. */ + class ListWorkflowInvocationsResponse implements IListWorkflowInvocationsResponse { + + /** + * Constructs a new ListWorkflowInvocationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse); + + /** ListWorkflowInvocationsResponse workflowInvocations. */ + public workflowInvocations: google.cloud.dataform.v1beta1.IWorkflowInvocation[]; + + /** ListWorkflowInvocationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListWorkflowInvocationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListWorkflowInvocationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkflowInvocationsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse): google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.verify|verify} messages. + * @param message ListWorkflowInvocationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.verify|verify} messages. + * @param message ListWorkflowInvocationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse; + + /** + * Verifies a ListWorkflowInvocationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkflowInvocationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkflowInvocationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse; + + /** + * Creates a plain object from a ListWorkflowInvocationsResponse message. Also converts values to other types if specified. + * @param message ListWorkflowInvocationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkflowInvocationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkflowInvocationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetWorkflowInvocationRequest. */ + interface IGetWorkflowInvocationRequest { + + /** GetWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a GetWorkflowInvocationRequest. */ + class GetWorkflowInvocationRequest implements IGetWorkflowInvocationRequest { + + /** + * Constructs a new GetWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest); + + /** GetWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new GetWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest): google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest; + + /** + * Encodes the specified GetWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest.verify|verify} messages. + * @param message GetWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest.verify|verify} messages. + * @param message GetWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest; + + /** + * Verifies a GetWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest; + + /** + * Creates a plain object from a GetWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message GetWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateWorkflowInvocationRequest. */ + interface ICreateWorkflowInvocationRequest { + + /** CreateWorkflowInvocationRequest parent */ + parent?: (string|null); + + /** CreateWorkflowInvocationRequest workflowInvocation */ + workflowInvocation?: (google.cloud.dataform.v1beta1.IWorkflowInvocation|null); + } + + /** Represents a CreateWorkflowInvocationRequest. */ + class CreateWorkflowInvocationRequest implements ICreateWorkflowInvocationRequest { + + /** + * Constructs a new CreateWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest); + + /** CreateWorkflowInvocationRequest parent. */ + public parent: string; + + /** CreateWorkflowInvocationRequest workflowInvocation. */ + public workflowInvocation?: (google.cloud.dataform.v1beta1.IWorkflowInvocation|null); + + /** + * Creates a new CreateWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest): google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.verify|verify} messages. + * @param message CreateWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.verify|verify} messages. + * @param message CreateWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest; + + /** + * Verifies a CreateWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest; + + /** + * Creates a plain object from a CreateWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message CreateWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteWorkflowInvocationRequest. */ + interface IDeleteWorkflowInvocationRequest { + + /** DeleteWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteWorkflowInvocationRequest. */ + class DeleteWorkflowInvocationRequest implements IDeleteWorkflowInvocationRequest { + + /** + * Constructs a new DeleteWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest); + + /** DeleteWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new DeleteWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest): google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @param message DeleteWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @param message DeleteWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest; + + /** + * Verifies a DeleteWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest; + + /** + * Creates a plain object from a DeleteWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message DeleteWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelWorkflowInvocationRequest. */ + interface ICancelWorkflowInvocationRequest { + + /** CancelWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a CancelWorkflowInvocationRequest. */ + class CancelWorkflowInvocationRequest implements ICancelWorkflowInvocationRequest { + + /** + * Constructs a new CancelWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest); + + /** CancelWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new CancelWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest): google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest.verify|verify} messages. + * @param message CancelWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest.verify|verify} messages. + * @param message CancelWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest; + + /** + * Verifies a CancelWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest; + + /** + * Creates a plain object from a CancelWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message CancelWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkflowInvocationAction. */ + interface IWorkflowInvocationAction { + + /** WorkflowInvocationAction target */ + target?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** WorkflowInvocationAction canonicalTarget */ + canonicalTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** WorkflowInvocationAction state */ + state?: (google.cloud.dataform.v1beta1.WorkflowInvocationAction.State|keyof typeof google.cloud.dataform.v1beta1.WorkflowInvocationAction.State|null); + + /** WorkflowInvocationAction failureReason */ + failureReason?: (string|null); + + /** WorkflowInvocationAction invocationTiming */ + invocationTiming?: (google.type.IInterval|null); + + /** WorkflowInvocationAction bigqueryAction */ + bigqueryAction?: (google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction|null); + } + + /** Represents a WorkflowInvocationAction. */ + class WorkflowInvocationAction implements IWorkflowInvocationAction { + + /** + * Constructs a new WorkflowInvocationAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWorkflowInvocationAction); + + /** WorkflowInvocationAction target. */ + public target?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** WorkflowInvocationAction canonicalTarget. */ + public canonicalTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** WorkflowInvocationAction state. */ + public state: (google.cloud.dataform.v1beta1.WorkflowInvocationAction.State|keyof typeof google.cloud.dataform.v1beta1.WorkflowInvocationAction.State); + + /** WorkflowInvocationAction failureReason. */ + public failureReason: string; + + /** WorkflowInvocationAction invocationTiming. */ + public invocationTiming?: (google.type.IInterval|null); + + /** WorkflowInvocationAction bigqueryAction. */ + public bigqueryAction?: (google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction|null); + + /** + * Creates a new WorkflowInvocationAction instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowInvocationAction instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWorkflowInvocationAction): google.cloud.dataform.v1beta1.WorkflowInvocationAction; + + /** + * Encodes the specified WorkflowInvocationAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify|verify} messages. + * @param message WorkflowInvocationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWorkflowInvocationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowInvocationAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify|verify} messages. + * @param message WorkflowInvocationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWorkflowInvocationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WorkflowInvocationAction; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WorkflowInvocationAction; + + /** + * Verifies a WorkflowInvocationAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkflowInvocationAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowInvocationAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WorkflowInvocationAction; + + /** + * Creates a plain object from a WorkflowInvocationAction message. Also converts values to other types if specified. + * @param message WorkflowInvocationAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WorkflowInvocationAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowInvocationAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkflowInvocationAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WorkflowInvocationAction { + + /** State enum. */ + enum State { + PENDING = 0, + RUNNING = 1, + SKIPPED = 2, + DISABLED = 3, + SUCCEEDED = 4, + CANCELLED = 5, + FAILED = 6 + } + + /** Properties of a BigQueryAction. */ + interface IBigQueryAction { + + /** BigQueryAction sqlScript */ + sqlScript?: (string|null); + } + + /** Represents a BigQueryAction. */ + class BigQueryAction implements IBigQueryAction { + + /** + * Constructs a new BigQueryAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction); + + /** BigQueryAction sqlScript. */ + public sqlScript: string; + + /** + * Creates a new BigQueryAction instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryAction instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction): google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction; + + /** + * Encodes the specified BigQueryAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @param message BigQueryAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @param message BigQueryAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction; + + /** + * Verifies a BigQueryAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction; + + /** + * Creates a plain object from a BigQueryAction message. Also converts values to other types if specified. + * @param message BigQueryAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a QueryWorkflowInvocationActionsRequest. */ + interface IQueryWorkflowInvocationActionsRequest { + + /** QueryWorkflowInvocationActionsRequest name */ + name?: (string|null); + + /** QueryWorkflowInvocationActionsRequest pageSize */ + pageSize?: (number|null); + + /** QueryWorkflowInvocationActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a QueryWorkflowInvocationActionsRequest. */ + class QueryWorkflowInvocationActionsRequest implements IQueryWorkflowInvocationActionsRequest { + + /** + * Constructs a new QueryWorkflowInvocationActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest); + + /** QueryWorkflowInvocationActionsRequest name. */ + public name: string; + + /** QueryWorkflowInvocationActionsRequest pageSize. */ + public pageSize: number; + + /** QueryWorkflowInvocationActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new QueryWorkflowInvocationActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryWorkflowInvocationActionsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest; + + /** + * Verifies a QueryWorkflowInvocationActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryWorkflowInvocationActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryWorkflowInvocationActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsRequest message. Also converts values to other types if specified. + * @param message QueryWorkflowInvocationActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryWorkflowInvocationActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryWorkflowInvocationActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryWorkflowInvocationActionsResponse. */ + interface IQueryWorkflowInvocationActionsResponse { + + /** QueryWorkflowInvocationActionsResponse workflowInvocationActions */ + workflowInvocationActions?: (google.cloud.dataform.v1beta1.IWorkflowInvocationAction[]|null); + + /** QueryWorkflowInvocationActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryWorkflowInvocationActionsResponse. */ + class QueryWorkflowInvocationActionsResponse implements IQueryWorkflowInvocationActionsResponse { + + /** + * Constructs a new QueryWorkflowInvocationActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse); + + /** QueryWorkflowInvocationActionsResponse workflowInvocationActions. */ + public workflowInvocationActions: google.cloud.dataform.v1beta1.IWorkflowInvocationAction[]; + + /** QueryWorkflowInvocationActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryWorkflowInvocationActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryWorkflowInvocationActionsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse; + + /** + * Verifies a QueryWorkflowInvocationActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryWorkflowInvocationActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryWorkflowInvocationActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsResponse message. Also converts values to other types if specified. + * @param message QueryWorkflowInvocationActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryWorkflowInvocationActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryWorkflowInvocationActionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of an Interval. */ + interface IInterval { + + /** Interval startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an Interval. */ + class Interval implements IInterval { + + /** + * Constructs a new Interval. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IInterval); + + /** Interval startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Interval instance using the specified properties. + * @param [properties] Properties to set + * @returns Interval instance + */ + public static create(properties?: google.type.IInterval): google.type.Interval; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Interval; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Interval; + + /** + * Verifies an Interval message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Interval + */ + public static fromObject(object: { [k: string]: any }): google.type.Interval; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @param message Interval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Interval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Interval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/google-cloud-dataform/protos/protos.js b/packages/google-cloud-dataform/protos/protos.js new file mode 100644 index 00000000000..15c7690bd85 --- /dev/null +++ b/packages/google-cloud-dataform/protos/protos.js @@ -0,0 +1,53531 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_dataform_protos || ($protobuf.roots._google_cloud_dataform_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.dataform = (function() { + + /** + * Namespace dataform. + * @memberof google.cloud + * @namespace + */ + var dataform = {}; + + dataform.v1alpha2 = (function() { + + /** + * Namespace v1alpha2. + * @memberof google.cloud.dataform + * @namespace + */ + var v1alpha2 = {}; + + v1alpha2.Dataform = (function() { + + /** + * Constructs a new Dataform service. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a Dataform + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Dataform(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Dataform.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Dataform; + + /** + * Creates new Dataform service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Dataform} RPC service. Useful where requests and/or responses are streamed. + */ + Dataform.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listRepositories}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef ListRepositoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.ListRepositoriesResponse} [response] ListRepositoriesResponse + */ + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.ListRepositoriesCallback} callback Node-style callback called with the error, if any, and ListRepositoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listRepositories = function listRepositories(request, callback) { + return this.rpcCall(listRepositories, $root.google.cloud.dataform.v1alpha2.ListRepositoriesRequest, $root.google.cloud.dataform.v1alpha2.ListRepositoriesResponse, request, callback); + }, "name", { value: "ListRepositories" }); + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getRepository}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef GetRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.Repository} [response] Repository + */ + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.GetRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getRepository = function getRepository(request, callback) { + return this.rpcCall(getRepository, $root.google.cloud.dataform.v1alpha2.GetRepositoryRequest, $root.google.cloud.dataform.v1alpha2.Repository, request, callback); + }, "name", { value: "GetRepository" }); + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createRepository}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef CreateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.Repository} [response] Repository + */ + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.CreateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createRepository = function createRepository(request, callback) { + return this.rpcCall(createRepository, $root.google.cloud.dataform.v1alpha2.CreateRepositoryRequest, $root.google.cloud.dataform.v1alpha2.Repository, request, callback); + }, "name", { value: "CreateRepository" }); + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|updateRepository}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef UpdateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.Repository} [response] Repository + */ + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.UpdateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.updateRepository = function updateRepository(request, callback) { + return this.rpcCall(updateRepository, $root.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest, $root.google.cloud.dataform.v1alpha2.Repository, request, callback); + }, "name", { value: "UpdateRepository" }); + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|deleteRepository}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef DeleteRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.DeleteRepositoryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteRepository = function deleteRepository(request, callback) { + return this.rpcCall(deleteRepository, $root.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteRepository" }); + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchRemoteBranches}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef FetchRemoteBranchesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse} [response] FetchRemoteBranchesResponse + */ + + /** + * Calls FetchRemoteBranches. + * @function fetchRemoteBranches + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest} request FetchRemoteBranchesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.FetchRemoteBranchesCallback} callback Node-style callback called with the error, if any, and FetchRemoteBranchesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchRemoteBranches = function fetchRemoteBranches(request, callback) { + return this.rpcCall(fetchRemoteBranches, $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest, $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse, request, callback); + }, "name", { value: "FetchRemoteBranches" }); + + /** + * Calls FetchRemoteBranches. + * @function fetchRemoteBranches + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest} request FetchRemoteBranchesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listWorkspaces}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef ListWorkspacesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.ListWorkspacesResponse} [response] ListWorkspacesResponse + */ + + /** + * Calls ListWorkspaces. + * @function listWorkspaces + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesRequest} request ListWorkspacesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.ListWorkspacesCallback} callback Node-style callback called with the error, if any, and ListWorkspacesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listWorkspaces = function listWorkspaces(request, callback) { + return this.rpcCall(listWorkspaces, $root.google.cloud.dataform.v1alpha2.ListWorkspacesRequest, $root.google.cloud.dataform.v1alpha2.ListWorkspacesResponse, request, callback); + }, "name", { value: "ListWorkspaces" }); + + /** + * Calls ListWorkspaces. + * @function listWorkspaces + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesRequest} request ListWorkspacesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getWorkspace}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef GetWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.Workspace} [response] Workspace + */ + + /** + * Calls GetWorkspace. + * @function getWorkspace + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetWorkspaceRequest} request GetWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.GetWorkspaceCallback} callback Node-style callback called with the error, if any, and Workspace + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getWorkspace = function getWorkspace(request, callback) { + return this.rpcCall(getWorkspace, $root.google.cloud.dataform.v1alpha2.GetWorkspaceRequest, $root.google.cloud.dataform.v1alpha2.Workspace, request, callback); + }, "name", { value: "GetWorkspace" }); + + /** + * Calls GetWorkspace. + * @function getWorkspace + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetWorkspaceRequest} request GetWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createWorkspace}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef CreateWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.Workspace} [response] Workspace + */ + + /** + * Calls CreateWorkspace. + * @function createWorkspace + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest} request CreateWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.CreateWorkspaceCallback} callback Node-style callback called with the error, if any, and Workspace + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createWorkspace = function createWorkspace(request, callback) { + return this.rpcCall(createWorkspace, $root.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest, $root.google.cloud.dataform.v1alpha2.Workspace, request, callback); + }, "name", { value: "CreateWorkspace" }); + + /** + * Calls CreateWorkspace. + * @function createWorkspace + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest} request CreateWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|deleteWorkspace}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef DeleteWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteWorkspace. + * @function deleteWorkspace + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest} request DeleteWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.DeleteWorkspaceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteWorkspace = function deleteWorkspace(request, callback) { + return this.rpcCall(deleteWorkspace, $root.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWorkspace" }); + + /** + * Calls DeleteWorkspace. + * @function deleteWorkspace + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest} request DeleteWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|installNpmPackages}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef InstallNpmPackagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse} [response] InstallNpmPackagesResponse + */ + + /** + * Calls InstallNpmPackages. + * @function installNpmPackages + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest} request InstallNpmPackagesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.InstallNpmPackagesCallback} callback Node-style callback called with the error, if any, and InstallNpmPackagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.installNpmPackages = function installNpmPackages(request, callback) { + return this.rpcCall(installNpmPackages, $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest, $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse, request, callback); + }, "name", { value: "InstallNpmPackages" }); + + /** + * Calls InstallNpmPackages. + * @function installNpmPackages + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest} request InstallNpmPackagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|pullGitCommits}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef PullGitCommitsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls PullGitCommits. + * @function pullGitCommits + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IPullGitCommitsRequest} request PullGitCommitsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.PullGitCommitsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.pullGitCommits = function pullGitCommits(request, callback) { + return this.rpcCall(pullGitCommits, $root.google.cloud.dataform.v1alpha2.PullGitCommitsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "PullGitCommits" }); + + /** + * Calls PullGitCommits. + * @function pullGitCommits + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IPullGitCommitsRequest} request PullGitCommitsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|pushGitCommits}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef PushGitCommitsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls PushGitCommits. + * @function pushGitCommits + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IPushGitCommitsRequest} request PushGitCommitsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.PushGitCommitsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.pushGitCommits = function pushGitCommits(request, callback) { + return this.rpcCall(pushGitCommits, $root.google.cloud.dataform.v1alpha2.PushGitCommitsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "PushGitCommits" }); + + /** + * Calls PushGitCommits. + * @function pushGitCommits + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IPushGitCommitsRequest} request PushGitCommitsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchFileGitStatuses}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef FetchFileGitStatusesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse} [response] FetchFileGitStatusesResponse + */ + + /** + * Calls FetchFileGitStatuses. + * @function fetchFileGitStatuses + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest} request FetchFileGitStatusesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.FetchFileGitStatusesCallback} callback Node-style callback called with the error, if any, and FetchFileGitStatusesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchFileGitStatuses = function fetchFileGitStatuses(request, callback) { + return this.rpcCall(fetchFileGitStatuses, $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest, $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse, request, callback); + }, "name", { value: "FetchFileGitStatuses" }); + + /** + * Calls FetchFileGitStatuses. + * @function fetchFileGitStatuses + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest} request FetchFileGitStatusesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchGitAheadBehind}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef FetchGitAheadBehindCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse} [response] FetchGitAheadBehindResponse + */ + + /** + * Calls FetchGitAheadBehind. + * @function fetchGitAheadBehind + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest} request FetchGitAheadBehindRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.FetchGitAheadBehindCallback} callback Node-style callback called with the error, if any, and FetchGitAheadBehindResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchGitAheadBehind = function fetchGitAheadBehind(request, callback) { + return this.rpcCall(fetchGitAheadBehind, $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest, $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse, request, callback); + }, "name", { value: "FetchGitAheadBehind" }); + + /** + * Calls FetchGitAheadBehind. + * @function fetchGitAheadBehind + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest} request FetchGitAheadBehindRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|commitWorkspaceChanges}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef CommitWorkspaceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CommitWorkspaceChanges. + * @function commitWorkspaceChanges + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest} request CommitWorkspaceChangesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.CommitWorkspaceChangesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.commitWorkspaceChanges = function commitWorkspaceChanges(request, callback) { + return this.rpcCall(commitWorkspaceChanges, $root.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CommitWorkspaceChanges" }); + + /** + * Calls CommitWorkspaceChanges. + * @function commitWorkspaceChanges + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest} request CommitWorkspaceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|resetWorkspaceChanges}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef ResetWorkspaceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ResetWorkspaceChanges. + * @function resetWorkspaceChanges + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest} request ResetWorkspaceChangesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.ResetWorkspaceChangesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.resetWorkspaceChanges = function resetWorkspaceChanges(request, callback) { + return this.rpcCall(resetWorkspaceChanges, $root.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "ResetWorkspaceChanges" }); + + /** + * Calls ResetWorkspaceChanges. + * @function resetWorkspaceChanges + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest} request ResetWorkspaceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchFileDiff}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef FetchFileDiffCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.FetchFileDiffResponse} [response] FetchFileDiffResponse + */ + + /** + * Calls FetchFileDiff. + * @function fetchFileDiff + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffRequest} request FetchFileDiffRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.FetchFileDiffCallback} callback Node-style callback called with the error, if any, and FetchFileDiffResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchFileDiff = function fetchFileDiff(request, callback) { + return this.rpcCall(fetchFileDiff, $root.google.cloud.dataform.v1alpha2.FetchFileDiffRequest, $root.google.cloud.dataform.v1alpha2.FetchFileDiffResponse, request, callback); + }, "name", { value: "FetchFileDiff" }); + + /** + * Calls FetchFileDiff. + * @function fetchFileDiff + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffRequest} request FetchFileDiffRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|queryDirectoryContents}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef QueryDirectoryContentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse} [response] QueryDirectoryContentsResponse + */ + + /** + * Calls QueryDirectoryContents. + * @function queryDirectoryContents + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest} request QueryDirectoryContentsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.QueryDirectoryContentsCallback} callback Node-style callback called with the error, if any, and QueryDirectoryContentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryDirectoryContents = function queryDirectoryContents(request, callback) { + return this.rpcCall(queryDirectoryContents, $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest, $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse, request, callback); + }, "name", { value: "QueryDirectoryContents" }); + + /** + * Calls QueryDirectoryContents. + * @function queryDirectoryContents + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest} request QueryDirectoryContentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|makeDirectory}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef MakeDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.MakeDirectoryResponse} [response] MakeDirectoryResponse + */ + + /** + * Calls MakeDirectory. + * @function makeDirectory + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryRequest} request MakeDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.MakeDirectoryCallback} callback Node-style callback called with the error, if any, and MakeDirectoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.makeDirectory = function makeDirectory(request, callback) { + return this.rpcCall(makeDirectory, $root.google.cloud.dataform.v1alpha2.MakeDirectoryRequest, $root.google.cloud.dataform.v1alpha2.MakeDirectoryResponse, request, callback); + }, "name", { value: "MakeDirectory" }); + + /** + * Calls MakeDirectory. + * @function makeDirectory + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryRequest} request MakeDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|removeDirectory}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef RemoveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls RemoveDirectory. + * @function removeDirectory + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest} request RemoveDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.RemoveDirectoryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.removeDirectory = function removeDirectory(request, callback) { + return this.rpcCall(removeDirectory, $root.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "RemoveDirectory" }); + + /** + * Calls RemoveDirectory. + * @function removeDirectory + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest} request RemoveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|moveDirectory}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef MoveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.MoveDirectoryResponse} [response] MoveDirectoryResponse + */ + + /** + * Calls MoveDirectory. + * @function moveDirectory + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryRequest} request MoveDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.MoveDirectoryCallback} callback Node-style callback called with the error, if any, and MoveDirectoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.moveDirectory = function moveDirectory(request, callback) { + return this.rpcCall(moveDirectory, $root.google.cloud.dataform.v1alpha2.MoveDirectoryRequest, $root.google.cloud.dataform.v1alpha2.MoveDirectoryResponse, request, callback); + }, "name", { value: "MoveDirectory" }); + + /** + * Calls MoveDirectory. + * @function moveDirectory + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryRequest} request MoveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|readFile}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef ReadFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.ReadFileResponse} [response] ReadFileResponse + */ + + /** + * Calls ReadFile. + * @function readFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IReadFileRequest} request ReadFileRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.ReadFileCallback} callback Node-style callback called with the error, if any, and ReadFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.readFile = function readFile(request, callback) { + return this.rpcCall(readFile, $root.google.cloud.dataform.v1alpha2.ReadFileRequest, $root.google.cloud.dataform.v1alpha2.ReadFileResponse, request, callback); + }, "name", { value: "ReadFile" }); + + /** + * Calls ReadFile. + * @function readFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IReadFileRequest} request ReadFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|removeFile}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef RemoveFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls RemoveFile. + * @function removeFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IRemoveFileRequest} request RemoveFileRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.RemoveFileCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.removeFile = function removeFile(request, callback) { + return this.rpcCall(removeFile, $root.google.cloud.dataform.v1alpha2.RemoveFileRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "RemoveFile" }); + + /** + * Calls RemoveFile. + * @function removeFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IRemoveFileRequest} request RemoveFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|moveFile}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef MoveFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.MoveFileResponse} [response] MoveFileResponse + */ + + /** + * Calls MoveFile. + * @function moveFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IMoveFileRequest} request MoveFileRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.MoveFileCallback} callback Node-style callback called with the error, if any, and MoveFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.moveFile = function moveFile(request, callback) { + return this.rpcCall(moveFile, $root.google.cloud.dataform.v1alpha2.MoveFileRequest, $root.google.cloud.dataform.v1alpha2.MoveFileResponse, request, callback); + }, "name", { value: "MoveFile" }); + + /** + * Calls MoveFile. + * @function moveFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IMoveFileRequest} request MoveFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|writeFile}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef WriteFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.WriteFileResponse} [response] WriteFileResponse + */ + + /** + * Calls WriteFile. + * @function writeFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IWriteFileRequest} request WriteFileRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.WriteFileCallback} callback Node-style callback called with the error, if any, and WriteFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.writeFile = function writeFile(request, callback) { + return this.rpcCall(writeFile, $root.google.cloud.dataform.v1alpha2.WriteFileRequest, $root.google.cloud.dataform.v1alpha2.WriteFileResponse, request, callback); + }, "name", { value: "WriteFile" }); + + /** + * Calls WriteFile. + * @function writeFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IWriteFileRequest} request WriteFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listCompilationResults}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef ListCompilationResultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.ListCompilationResultsResponse} [response] ListCompilationResultsResponse + */ + + /** + * Calls ListCompilationResults. + * @function listCompilationResults + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsRequest} request ListCompilationResultsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.ListCompilationResultsCallback} callback Node-style callback called with the error, if any, and ListCompilationResultsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listCompilationResults = function listCompilationResults(request, callback) { + return this.rpcCall(listCompilationResults, $root.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest, $root.google.cloud.dataform.v1alpha2.ListCompilationResultsResponse, request, callback); + }, "name", { value: "ListCompilationResults" }); + + /** + * Calls ListCompilationResults. + * @function listCompilationResults + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsRequest} request ListCompilationResultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getCompilationResult}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef GetCompilationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.CompilationResult} [response] CompilationResult + */ + + /** + * Calls GetCompilationResult. + * @function getCompilationResult + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetCompilationResultRequest} request GetCompilationResultRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.GetCompilationResultCallback} callback Node-style callback called with the error, if any, and CompilationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getCompilationResult = function getCompilationResult(request, callback) { + return this.rpcCall(getCompilationResult, $root.google.cloud.dataform.v1alpha2.GetCompilationResultRequest, $root.google.cloud.dataform.v1alpha2.CompilationResult, request, callback); + }, "name", { value: "GetCompilationResult" }); + + /** + * Calls GetCompilationResult. + * @function getCompilationResult + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetCompilationResultRequest} request GetCompilationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createCompilationResult}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef CreateCompilationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.CompilationResult} [response] CompilationResult + */ + + /** + * Calls CreateCompilationResult. + * @function createCompilationResult + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest} request CreateCompilationResultRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.CreateCompilationResultCallback} callback Node-style callback called with the error, if any, and CompilationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createCompilationResult = function createCompilationResult(request, callback) { + return this.rpcCall(createCompilationResult, $root.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest, $root.google.cloud.dataform.v1alpha2.CompilationResult, request, callback); + }, "name", { value: "CreateCompilationResult" }); + + /** + * Calls CreateCompilationResult. + * @function createCompilationResult + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest} request CreateCompilationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|queryCompilationResultActions}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef QueryCompilationResultActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse} [response] QueryCompilationResultActionsResponse + */ + + /** + * Calls QueryCompilationResultActions. + * @function queryCompilationResultActions + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest} request QueryCompilationResultActionsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.QueryCompilationResultActionsCallback} callback Node-style callback called with the error, if any, and QueryCompilationResultActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryCompilationResultActions = function queryCompilationResultActions(request, callback) { + return this.rpcCall(queryCompilationResultActions, $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest, $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse, request, callback); + }, "name", { value: "QueryCompilationResultActions" }); + + /** + * Calls QueryCompilationResultActions. + * @function queryCompilationResultActions + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest} request QueryCompilationResultActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listWorkflowInvocations}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef ListWorkflowInvocationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse} [response] ListWorkflowInvocationsResponse + */ + + /** + * Calls ListWorkflowInvocations. + * @function listWorkflowInvocations + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest} request ListWorkflowInvocationsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.ListWorkflowInvocationsCallback} callback Node-style callback called with the error, if any, and ListWorkflowInvocationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listWorkflowInvocations = function listWorkflowInvocations(request, callback) { + return this.rpcCall(listWorkflowInvocations, $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest, $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse, request, callback); + }, "name", { value: "ListWorkflowInvocations" }); + + /** + * Calls ListWorkflowInvocations. + * @function listWorkflowInvocations + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest} request ListWorkflowInvocationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getWorkflowInvocation}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef GetWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation} [response] WorkflowInvocation + */ + + /** + * Calls GetWorkflowInvocation. + * @function getWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest} request GetWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.GetWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and WorkflowInvocation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getWorkflowInvocation = function getWorkflowInvocation(request, callback) { + return this.rpcCall(getWorkflowInvocation, $root.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest, $root.google.cloud.dataform.v1alpha2.WorkflowInvocation, request, callback); + }, "name", { value: "GetWorkflowInvocation" }); + + /** + * Calls GetWorkflowInvocation. + * @function getWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest} request GetWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createWorkflowInvocation}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef CreateWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation} [response] WorkflowInvocation + */ + + /** + * Calls CreateWorkflowInvocation. + * @function createWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest} request CreateWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.CreateWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and WorkflowInvocation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createWorkflowInvocation = function createWorkflowInvocation(request, callback) { + return this.rpcCall(createWorkflowInvocation, $root.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest, $root.google.cloud.dataform.v1alpha2.WorkflowInvocation, request, callback); + }, "name", { value: "CreateWorkflowInvocation" }); + + /** + * Calls CreateWorkflowInvocation. + * @function createWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest} request CreateWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|deleteWorkflowInvocation}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef DeleteWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteWorkflowInvocation. + * @function deleteWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest} request DeleteWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.DeleteWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteWorkflowInvocation = function deleteWorkflowInvocation(request, callback) { + return this.rpcCall(deleteWorkflowInvocation, $root.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWorkflowInvocation" }); + + /** + * Calls DeleteWorkflowInvocation. + * @function deleteWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest} request DeleteWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|cancelWorkflowInvocation}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef CancelWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelWorkflowInvocation. + * @function cancelWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest} request CancelWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.CancelWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.cancelWorkflowInvocation = function cancelWorkflowInvocation(request, callback) { + return this.rpcCall(cancelWorkflowInvocation, $root.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelWorkflowInvocation" }); + + /** + * Calls CancelWorkflowInvocation. + * @function cancelWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest} request CancelWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|queryWorkflowInvocationActions}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef QueryWorkflowInvocationActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse} [response] QueryWorkflowInvocationActionsResponse + */ + + /** + * Calls QueryWorkflowInvocationActions. + * @function queryWorkflowInvocationActions + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest} request QueryWorkflowInvocationActionsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.QueryWorkflowInvocationActionsCallback} callback Node-style callback called with the error, if any, and QueryWorkflowInvocationActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryWorkflowInvocationActions = function queryWorkflowInvocationActions(request, callback) { + return this.rpcCall(queryWorkflowInvocationActions, $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest, $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse, request, callback); + }, "name", { value: "QueryWorkflowInvocationActions" }); + + /** + * Calls QueryWorkflowInvocationActions. + * @function queryWorkflowInvocationActions + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest} request QueryWorkflowInvocationActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Dataform; + })(); + + v1alpha2.Repository = (function() { + + /** + * Properties of a Repository. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IRepository + * @property {string|null} [name] Repository name + * @property {google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings|null} [gitRemoteSettings] Repository gitRemoteSettings + */ + + /** + * Constructs a new Repository. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a Repository. + * @implements IRepository + * @constructor + * @param {google.cloud.dataform.v1alpha2.IRepository=} [properties] Properties to set + */ + function Repository(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Repository name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.Repository + * @instance + */ + Repository.prototype.name = ""; + + /** + * Repository gitRemoteSettings. + * @member {google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings|null|undefined} gitRemoteSettings + * @memberof google.cloud.dataform.v1alpha2.Repository + * @instance + */ + Repository.prototype.gitRemoteSettings = null; + + /** + * Creates a new Repository instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {google.cloud.dataform.v1alpha2.IRepository=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.Repository} Repository instance + */ + Repository.create = function create(properties) { + return new Repository(properties); + }; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {google.cloud.dataform.v1alpha2.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.gitRemoteSettings != null && Object.hasOwnProperty.call(message, "gitRemoteSettings")) + $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.encode(message.gitRemoteSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {google.cloud.dataform.v1alpha2.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.Repository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.gitRemoteSettings = $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Repository message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Repository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.gitRemoteSettings != null && message.hasOwnProperty("gitRemoteSettings")) { + var error = $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.verify(message.gitRemoteSettings); + if (error) + return "gitRemoteSettings." + error; + } + return null; + }; + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.Repository} Repository + */ + Repository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.Repository) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.Repository(); + if (object.name != null) + message.name = String(object.name); + if (object.gitRemoteSettings != null) { + if (typeof object.gitRemoteSettings !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.Repository.gitRemoteSettings: object expected"); + message.gitRemoteSettings = $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.fromObject(object.gitRemoteSettings); + } + return message; + }; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {google.cloud.dataform.v1alpha2.Repository} message Repository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Repository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.gitRemoteSettings = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gitRemoteSettings != null && message.hasOwnProperty("gitRemoteSettings")) + object.gitRemoteSettings = $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.toObject(message.gitRemoteSettings, options); + return object; + }; + + /** + * Converts this Repository to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.Repository + * @instance + * @returns {Object.} JSON object + */ + Repository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Repository + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Repository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.Repository"; + }; + + Repository.GitRemoteSettings = (function() { + + /** + * Properties of a GitRemoteSettings. + * @memberof google.cloud.dataform.v1alpha2.Repository + * @interface IGitRemoteSettings + * @property {string|null} [url] GitRemoteSettings url + * @property {string|null} [defaultBranch] GitRemoteSettings defaultBranch + * @property {string|null} [authenticationTokenSecretVersion] GitRemoteSettings authenticationTokenSecretVersion + * @property {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus|null} [tokenStatus] GitRemoteSettings tokenStatus + */ + + /** + * Constructs a new GitRemoteSettings. + * @memberof google.cloud.dataform.v1alpha2.Repository + * @classdesc Represents a GitRemoteSettings. + * @implements IGitRemoteSettings + * @constructor + * @param {google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings=} [properties] Properties to set + */ + function GitRemoteSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GitRemoteSettings url. + * @member {string} url + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.url = ""; + + /** + * GitRemoteSettings defaultBranch. + * @member {string} defaultBranch + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.defaultBranch = ""; + + /** + * GitRemoteSettings authenticationTokenSecretVersion. + * @member {string} authenticationTokenSecretVersion + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.authenticationTokenSecretVersion = ""; + + /** + * GitRemoteSettings tokenStatus. + * @member {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus} tokenStatus + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.tokenStatus = 0; + + /** + * Creates a new GitRemoteSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings} GitRemoteSettings instance + */ + GitRemoteSettings.create = function create(properties) { + return new GitRemoteSettings(properties); + }; + + /** + * Encodes the specified GitRemoteSettings message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings} message GitRemoteSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitRemoteSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.defaultBranch != null && Object.hasOwnProperty.call(message, "defaultBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultBranch); + if (message.authenticationTokenSecretVersion != null && Object.hasOwnProperty.call(message, "authenticationTokenSecretVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.authenticationTokenSecretVersion); + if (message.tokenStatus != null && Object.hasOwnProperty.call(message, "tokenStatus")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.tokenStatus); + return writer; + }; + + /** + * Encodes the specified GitRemoteSettings message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings} message GitRemoteSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitRemoteSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings} GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitRemoteSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.url = reader.string(); + break; + } + case 2: { + message.defaultBranch = reader.string(); + break; + } + case 3: { + message.authenticationTokenSecretVersion = reader.string(); + break; + } + case 4: { + message.tokenStatus = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings} GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitRemoteSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitRemoteSettings message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitRemoteSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.defaultBranch != null && message.hasOwnProperty("defaultBranch")) + if (!$util.isString(message.defaultBranch)) + return "defaultBranch: string expected"; + if (message.authenticationTokenSecretVersion != null && message.hasOwnProperty("authenticationTokenSecretVersion")) + if (!$util.isString(message.authenticationTokenSecretVersion)) + return "authenticationTokenSecretVersion: string expected"; + if (message.tokenStatus != null && message.hasOwnProperty("tokenStatus")) + switch (message.tokenStatus) { + default: + return "tokenStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a GitRemoteSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings} GitRemoteSettings + */ + GitRemoteSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings(); + if (object.url != null) + message.url = String(object.url); + if (object.defaultBranch != null) + message.defaultBranch = String(object.defaultBranch); + if (object.authenticationTokenSecretVersion != null) + message.authenticationTokenSecretVersion = String(object.authenticationTokenSecretVersion); + switch (object.tokenStatus) { + default: + if (typeof object.tokenStatus === "number") { + message.tokenStatus = object.tokenStatus; + break; + } + break; + case "TOKEN_STATUS_UNSPECIFIED": + case 0: + message.tokenStatus = 0; + break; + case "NOT_FOUND": + case 1: + message.tokenStatus = 1; + break; + case "INVALID": + case 2: + message.tokenStatus = 2; + break; + case "VALID": + case 3: + message.tokenStatus = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a GitRemoteSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings} message GitRemoteSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitRemoteSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + object.defaultBranch = ""; + object.authenticationTokenSecretVersion = ""; + object.tokenStatus = options.enums === String ? "TOKEN_STATUS_UNSPECIFIED" : 0; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.defaultBranch != null && message.hasOwnProperty("defaultBranch")) + object.defaultBranch = message.defaultBranch; + if (message.authenticationTokenSecretVersion != null && message.hasOwnProperty("authenticationTokenSecretVersion")) + object.authenticationTokenSecretVersion = message.authenticationTokenSecretVersion; + if (message.tokenStatus != null && message.hasOwnProperty("tokenStatus")) + object.tokenStatus = options.enums === String ? $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] === undefined ? message.tokenStatus : $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] : message.tokenStatus; + return object; + }; + + /** + * Converts this GitRemoteSettings to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @instance + * @returns {Object.} JSON object + */ + GitRemoteSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GitRemoteSettings + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GitRemoteSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings"; + }; + + /** + * TokenStatus enum. + * @name google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus + * @enum {number} + * @property {number} TOKEN_STATUS_UNSPECIFIED=0 TOKEN_STATUS_UNSPECIFIED value + * @property {number} NOT_FOUND=1 NOT_FOUND value + * @property {number} INVALID=2 INVALID value + * @property {number} VALID=3 VALID value + */ + GitRemoteSettings.TokenStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TOKEN_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "NOT_FOUND"] = 1; + values[valuesById[2] = "INVALID"] = 2; + values[valuesById[3] = "VALID"] = 3; + return values; + })(); + + return GitRemoteSettings; + })(); + + return Repository; + })(); + + v1alpha2.ListRepositoriesRequest = (function() { + + /** + * Properties of a ListRepositoriesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListRepositoriesRequest + * @property {string|null} [parent] ListRepositoriesRequest parent + * @property {number|null} [pageSize] ListRepositoriesRequest pageSize + * @property {string|null} [pageToken] ListRepositoriesRequest pageToken + * @property {string|null} [orderBy] ListRepositoriesRequest orderBy + * @property {string|null} [filter] ListRepositoriesRequest filter + */ + + /** + * Constructs a new ListRepositoriesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListRepositoriesRequest. + * @implements IListRepositoriesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesRequest=} [properties] Properties to set + */ + function ListRepositoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.parent = ""; + + /** + * ListRepositoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageSize = 0; + + /** + * ListRepositoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageToken = ""; + + /** + * ListRepositoriesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.orderBy = ""; + + /** + * ListRepositoriesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.filter = ""; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesRequest} ListRepositoriesRequest instance + */ + ListRepositoriesRequest.create = function create(properties) { + return new ListRepositoriesRequest(properties); + }; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListRepositoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesRequest} ListRepositoriesRequest + */ + ListRepositoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListRepositoriesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListRepositoriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ListRepositoriesRequest} message ListRepositoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRepositoriesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListRepositoriesRequest"; + }; + + return ListRepositoriesRequest; + })(); + + v1alpha2.ListRepositoriesResponse = (function() { + + /** + * Properties of a ListRepositoriesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListRepositoriesResponse + * @property {Array.|null} [repositories] ListRepositoriesResponse repositories + * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken + * @property {Array.|null} [unreachable] ListRepositoriesResponse unreachable + */ + + /** + * Constructs a new ListRepositoriesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListRepositoriesResponse. + * @implements IListRepositoriesResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesResponse=} [properties] Properties to set + */ + function ListRepositoriesResponse(properties) { + this.repositories = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesResponse repositories. + * @member {Array.} repositories + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.repositories = $util.emptyArray; + + /** + * ListRepositoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.nextPageToken = ""; + + /** + * ListRepositoriesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesResponse} ListRepositoriesResponse instance + */ + ListRepositoriesResponse.create = function create(properties) { + return new ListRepositoriesResponse(properties); + }; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repositories != null && message.repositories.length) + for (var i = 0; i < message.repositories.length; ++i) + $root.google.cloud.dataform.v1alpha2.Repository.encode(message.repositories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListRepositoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.repositories && message.repositories.length)) + message.repositories = []; + message.repositories.push($root.google.cloud.dataform.v1alpha2.Repository.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repositories != null && message.hasOwnProperty("repositories")) { + if (!Array.isArray(message.repositories)) + return "repositories: array expected"; + for (var i = 0; i < message.repositories.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.Repository.verify(message.repositories[i]); + if (error) + return "repositories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesResponse} ListRepositoriesResponse + */ + ListRepositoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListRepositoriesResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListRepositoriesResponse(); + if (object.repositories) { + if (!Array.isArray(object.repositories)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListRepositoriesResponse.repositories: array expected"); + message.repositories = []; + for (var i = 0; i < object.repositories.length; ++i) { + if (typeof object.repositories[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.ListRepositoriesResponse.repositories: object expected"); + message.repositories[i] = $root.google.cloud.dataform.v1alpha2.Repository.fromObject(object.repositories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListRepositoriesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.ListRepositoriesResponse} message ListRepositoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.repositories = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.repositories && message.repositories.length) { + object.repositories = []; + for (var j = 0; j < message.repositories.length; ++j) + object.repositories[j] = $root.google.cloud.dataform.v1alpha2.Repository.toObject(message.repositories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRepositoriesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListRepositoriesResponse"; + }; + + return ListRepositoriesResponse; + })(); + + v1alpha2.GetRepositoryRequest = (function() { + + /** + * Properties of a GetRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IGetRepositoryRequest + * @property {string|null} [name] GetRepositoryRequest name + */ + + /** + * Constructs a new GetRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a GetRepositoryRequest. + * @implements IGetRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IGetRepositoryRequest=} [properties] Properties to set + */ + function GetRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetRepositoryRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @instance + */ + GetRepositoryRequest.prototype.name = ""; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.GetRepositoryRequest} GetRepositoryRequest instance + */ + GetRepositoryRequest.create = function create(properties) { + return new GetRepositoryRequest(properties); + }; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.GetRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.GetRepositoryRequest} GetRepositoryRequest + */ + GetRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.GetRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.GetRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.GetRepositoryRequest} message GetRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.GetRepositoryRequest"; + }; + + return GetRepositoryRequest; + })(); + + v1alpha2.CreateRepositoryRequest = (function() { + + /** + * Properties of a CreateRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICreateRepositoryRequest + * @property {string|null} [parent] CreateRepositoryRequest parent + * @property {google.cloud.dataform.v1alpha2.IRepository|null} [repository] CreateRepositoryRequest repository + * @property {string|null} [repositoryId] CreateRepositoryRequest repositoryId + */ + + /** + * Constructs a new CreateRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CreateRepositoryRequest. + * @implements ICreateRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICreateRepositoryRequest=} [properties] Properties to set + */ + function CreateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateRepositoryRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.parent = ""; + + /** + * CreateRepositoryRequest repository. + * @member {google.cloud.dataform.v1alpha2.IRepository|null|undefined} repository + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repository = null; + + /** + * CreateRepositoryRequest repositoryId. + * @member {string} repositoryId + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repositoryId = ""; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CreateRepositoryRequest} CreateRepositoryRequest instance + */ + CreateRepositoryRequest.create = function create(properties) { + return new CreateRepositoryRequest(properties); + }; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.dataform.v1alpha2.Repository.encode(message.repository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repositoryId != null && Object.hasOwnProperty.call(message, "repositoryId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.repositoryId); + return writer; + }; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CreateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.repository = $root.google.cloud.dataform.v1alpha2.Repository.decode(reader, reader.uint32()); + break; + } + case 3: { + message.repositoryId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.cloud.dataform.v1alpha2.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + if (!$util.isString(message.repositoryId)) + return "repositoryId: string expected"; + return null; + }; + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CreateRepositoryRequest} CreateRepositoryRequest + */ + CreateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CreateRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CreateRepositoryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CreateRepositoryRequest.repository: object expected"); + message.repository = $root.google.cloud.dataform.v1alpha2.Repository.fromObject(object.repository); + } + if (object.repositoryId != null) + message.repositoryId = String(object.repositoryId); + return message; + }; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.CreateRepositoryRequest} message CreateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.repository = null; + object.repositoryId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.cloud.dataform.v1alpha2.Repository.toObject(message.repository, options); + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + object.repositoryId = message.repositoryId; + return object; + }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CreateRepositoryRequest"; + }; + + return CreateRepositoryRequest; + })(); + + v1alpha2.UpdateRepositoryRequest = (function() { + + /** + * Properties of an UpdateRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IUpdateRepositoryRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateRepositoryRequest updateMask + * @property {google.cloud.dataform.v1alpha2.IRepository|null} [repository] UpdateRepositoryRequest repository + */ + + /** + * Constructs a new UpdateRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents an UpdateRepositoryRequest. + * @implements IUpdateRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest=} [properties] Properties to set + */ + function UpdateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateRepositoryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.updateMask = null; + + /** + * UpdateRepositoryRequest repository. + * @member {google.cloud.dataform.v1alpha2.IRepository|null|undefined} repository + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.repository = null; + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.UpdateRepositoryRequest} UpdateRepositoryRequest instance + */ + UpdateRepositoryRequest.create = function create(properties) { + return new UpdateRepositoryRequest(properties); + }; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.dataform.v1alpha2.Repository.encode(message.repository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.repository = $root.google.cloud.dataform.v1alpha2.Repository.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.cloud.dataform.v1alpha2.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + return null; + }; + + /** + * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.UpdateRepositoryRequest} UpdateRepositoryRequest + */ + UpdateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.repository: object expected"); + message.repository = $root.google.cloud.dataform.v1alpha2.Repository.fromObject(object.repository); + } + return message; + }; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.UpdateRepositoryRequest} message UpdateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.repository = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.cloud.dataform.v1alpha2.Repository.toObject(message.repository, options); + return object; + }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.UpdateRepositoryRequest"; + }; + + return UpdateRepositoryRequest; + })(); + + v1alpha2.DeleteRepositoryRequest = (function() { + + /** + * Properties of a DeleteRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IDeleteRepositoryRequest + * @property {string|null} [name] DeleteRepositoryRequest name + * @property {boolean|null} [force] DeleteRepositoryRequest force + */ + + /** + * Constructs a new DeleteRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a DeleteRepositoryRequest. + * @implements IDeleteRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest=} [properties] Properties to set + */ + function DeleteRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteRepositoryRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.name = ""; + + /** + * DeleteRepositoryRequest force. + * @member {boolean} force + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.force = false; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.DeleteRepositoryRequest} DeleteRepositoryRequest instance + */ + DeleteRepositoryRequest.create = function create(properties) { + return new DeleteRepositoryRequest(properties); + }; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.DeleteRepositoryRequest} DeleteRepositoryRequest + */ + DeleteRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.DeleteRepositoryRequest} message DeleteRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.DeleteRepositoryRequest"; + }; + + return DeleteRepositoryRequest; + })(); + + v1alpha2.FetchRemoteBranchesRequest = (function() { + + /** + * Properties of a FetchRemoteBranchesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchRemoteBranchesRequest + * @property {string|null} [name] FetchRemoteBranchesRequest name + */ + + /** + * Constructs a new FetchRemoteBranchesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchRemoteBranchesRequest. + * @implements IFetchRemoteBranchesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest=} [properties] Properties to set + */ + function FetchRemoteBranchesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchRemoteBranchesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @instance + */ + FetchRemoteBranchesRequest.prototype.name = ""; + + /** + * Creates a new FetchRemoteBranchesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest instance + */ + FetchRemoteBranchesRequest.create = function create(properties) { + return new FetchRemoteBranchesRequest(properties); + }; + + /** + * Encodes the specified FetchRemoteBranchesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest} message FetchRemoteBranchesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified FetchRemoteBranchesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest} message FetchRemoteBranchesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchRemoteBranchesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchRemoteBranchesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a FetchRemoteBranchesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + */ + FetchRemoteBranchesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FetchRemoteBranchesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest} message FetchRemoteBranchesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchRemoteBranchesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this FetchRemoteBranchesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchRemoteBranchesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchRemoteBranchesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchRemoteBranchesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest"; + }; + + return FetchRemoteBranchesRequest; + })(); + + v1alpha2.FetchRemoteBranchesResponse = (function() { + + /** + * Properties of a FetchRemoteBranchesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchRemoteBranchesResponse + * @property {Array.|null} [branches] FetchRemoteBranchesResponse branches + */ + + /** + * Constructs a new FetchRemoteBranchesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchRemoteBranchesResponse. + * @implements IFetchRemoteBranchesResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse=} [properties] Properties to set + */ + function FetchRemoteBranchesResponse(properties) { + this.branches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchRemoteBranchesResponse branches. + * @member {Array.} branches + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @instance + */ + FetchRemoteBranchesResponse.prototype.branches = $util.emptyArray; + + /** + * Creates a new FetchRemoteBranchesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse instance + */ + FetchRemoteBranchesResponse.create = function create(properties) { + return new FetchRemoteBranchesResponse(properties); + }; + + /** + * Encodes the specified FetchRemoteBranchesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse} message FetchRemoteBranchesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.branches != null && message.branches.length) + for (var i = 0; i < message.branches.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.branches[i]); + return writer; + }; + + /** + * Encodes the specified FetchRemoteBranchesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse} message FetchRemoteBranchesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.branches && message.branches.length)) + message.branches = []; + message.branches.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchRemoteBranchesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchRemoteBranchesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.branches != null && message.hasOwnProperty("branches")) { + if (!Array.isArray(message.branches)) + return "branches: array expected"; + for (var i = 0; i < message.branches.length; ++i) + if (!$util.isString(message.branches[i])) + return "branches: string[] expected"; + } + return null; + }; + + /** + * Creates a FetchRemoteBranchesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + */ + FetchRemoteBranchesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse(); + if (object.branches) { + if (!Array.isArray(object.branches)) + throw TypeError(".google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse.branches: array expected"); + message.branches = []; + for (var i = 0; i < object.branches.length; ++i) + message.branches[i] = String(object.branches[i]); + } + return message; + }; + + /** + * Creates a plain object from a FetchRemoteBranchesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse} message FetchRemoteBranchesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchRemoteBranchesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.branches = []; + if (message.branches && message.branches.length) { + object.branches = []; + for (var j = 0; j < message.branches.length; ++j) + object.branches[j] = message.branches[j]; + } + return object; + }; + + /** + * Converts this FetchRemoteBranchesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchRemoteBranchesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchRemoteBranchesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchRemoteBranchesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse"; + }; + + return FetchRemoteBranchesResponse; + })(); + + v1alpha2.Workspace = (function() { + + /** + * Properties of a Workspace. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IWorkspace + * @property {string|null} [name] Workspace name + */ + + /** + * Constructs a new Workspace. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a Workspace. + * @implements IWorkspace + * @constructor + * @param {google.cloud.dataform.v1alpha2.IWorkspace=} [properties] Properties to set + */ + function Workspace(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Workspace name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @instance + */ + Workspace.prototype.name = ""; + + /** + * Creates a new Workspace instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkspace=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.Workspace} Workspace instance + */ + Workspace.create = function create(properties) { + return new Workspace(properties); + }; + + /** + * Encodes the specified Workspace message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Workspace.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkspace} message Workspace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Workspace.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified Workspace message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Workspace.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkspace} message Workspace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Workspace.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Workspace message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.Workspace} Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Workspace.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.Workspace(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Workspace message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.Workspace} Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Workspace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Workspace message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Workspace.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Workspace message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.Workspace} Workspace + */ + Workspace.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.Workspace) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.Workspace(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Workspace message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {google.cloud.dataform.v1alpha2.Workspace} message Workspace + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Workspace.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Workspace to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @instance + * @returns {Object.} JSON object + */ + Workspace.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Workspace + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Workspace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.Workspace"; + }; + + return Workspace; + })(); + + v1alpha2.ListWorkspacesRequest = (function() { + + /** + * Properties of a ListWorkspacesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListWorkspacesRequest + * @property {string|null} [parent] ListWorkspacesRequest parent + * @property {number|null} [pageSize] ListWorkspacesRequest pageSize + * @property {string|null} [pageToken] ListWorkspacesRequest pageToken + * @property {string|null} [orderBy] ListWorkspacesRequest orderBy + * @property {string|null} [filter] ListWorkspacesRequest filter + */ + + /** + * Constructs a new ListWorkspacesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListWorkspacesRequest. + * @implements IListWorkspacesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesRequest=} [properties] Properties to set + */ + function ListWorkspacesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkspacesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.parent = ""; + + /** + * ListWorkspacesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.pageSize = 0; + + /** + * ListWorkspacesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.pageToken = ""; + + /** + * ListWorkspacesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.orderBy = ""; + + /** + * ListWorkspacesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.filter = ""; + + /** + * Creates a new ListWorkspacesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesRequest} ListWorkspacesRequest instance + */ + ListWorkspacesRequest.create = function create(properties) { + return new ListWorkspacesRequest(properties); + }; + + /** + * Encodes the specified ListWorkspacesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesRequest} message ListWorkspacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListWorkspacesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesRequest} message ListWorkspacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesRequest} ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListWorkspacesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesRequest} ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkspacesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkspacesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListWorkspacesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesRequest} ListWorkspacesRequest + */ + ListWorkspacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListWorkspacesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListWorkspacesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListWorkspacesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ListWorkspacesRequest} message ListWorkspacesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkspacesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListWorkspacesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkspacesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkspacesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkspacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListWorkspacesRequest"; + }; + + return ListWorkspacesRequest; + })(); + + v1alpha2.ListWorkspacesResponse = (function() { + + /** + * Properties of a ListWorkspacesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListWorkspacesResponse + * @property {Array.|null} [workspaces] ListWorkspacesResponse workspaces + * @property {string|null} [nextPageToken] ListWorkspacesResponse nextPageToken + * @property {Array.|null} [unreachable] ListWorkspacesResponse unreachable + */ + + /** + * Constructs a new ListWorkspacesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListWorkspacesResponse. + * @implements IListWorkspacesResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesResponse=} [properties] Properties to set + */ + function ListWorkspacesResponse(properties) { + this.workspaces = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkspacesResponse workspaces. + * @member {Array.} workspaces + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.workspaces = $util.emptyArray; + + /** + * ListWorkspacesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.nextPageToken = ""; + + /** + * ListWorkspacesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListWorkspacesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesResponse} ListWorkspacesResponse instance + */ + ListWorkspacesResponse.create = function create(properties) { + return new ListWorkspacesResponse(properties); + }; + + /** + * Encodes the specified ListWorkspacesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesResponse} message ListWorkspacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspaces != null && message.workspaces.length) + for (var i = 0; i < message.workspaces.length; ++i) + $root.google.cloud.dataform.v1alpha2.Workspace.encode(message.workspaces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListWorkspacesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesResponse} message ListWorkspacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesResponse} ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListWorkspacesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.workspaces && message.workspaces.length)) + message.workspaces = []; + message.workspaces.push($root.google.cloud.dataform.v1alpha2.Workspace.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesResponse} ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkspacesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkspacesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspaces != null && message.hasOwnProperty("workspaces")) { + if (!Array.isArray(message.workspaces)) + return "workspaces: array expected"; + for (var i = 0; i < message.workspaces.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.Workspace.verify(message.workspaces[i]); + if (error) + return "workspaces." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListWorkspacesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesResponse} ListWorkspacesResponse + */ + ListWorkspacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListWorkspacesResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListWorkspacesResponse(); + if (object.workspaces) { + if (!Array.isArray(object.workspaces)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListWorkspacesResponse.workspaces: array expected"); + message.workspaces = []; + for (var i = 0; i < object.workspaces.length; ++i) { + if (typeof object.workspaces[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.ListWorkspacesResponse.workspaces: object expected"); + message.workspaces[i] = $root.google.cloud.dataform.v1alpha2.Workspace.fromObject(object.workspaces[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListWorkspacesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListWorkspacesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.ListWorkspacesResponse} message ListWorkspacesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkspacesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.workspaces = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.workspaces && message.workspaces.length) { + object.workspaces = []; + for (var j = 0; j < message.workspaces.length; ++j) + object.workspaces[j] = $root.google.cloud.dataform.v1alpha2.Workspace.toObject(message.workspaces[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListWorkspacesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkspacesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkspacesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkspacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListWorkspacesResponse"; + }; + + return ListWorkspacesResponse; + })(); + + v1alpha2.GetWorkspaceRequest = (function() { + + /** + * Properties of a GetWorkspaceRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IGetWorkspaceRequest + * @property {string|null} [name] GetWorkspaceRequest name + */ + + /** + * Constructs a new GetWorkspaceRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a GetWorkspaceRequest. + * @implements IGetWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IGetWorkspaceRequest=} [properties] Properties to set + */ + function GetWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @instance + */ + GetWorkspaceRequest.prototype.name = ""; + + /** + * Creates a new GetWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.GetWorkspaceRequest} GetWorkspaceRequest instance + */ + GetWorkspaceRequest.create = function create(properties) { + return new GetWorkspaceRequest(properties); + }; + + /** + * Encodes the specified GetWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetWorkspaceRequest} message GetWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkspaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetWorkspaceRequest} message GetWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.GetWorkspaceRequest} GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.GetWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.GetWorkspaceRequest} GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkspaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.GetWorkspaceRequest} GetWorkspaceRequest + */ + GetWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.GetWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.GetWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.GetWorkspaceRequest} message GetWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.GetWorkspaceRequest"; + }; + + return GetWorkspaceRequest; + })(); + + v1alpha2.CreateWorkspaceRequest = (function() { + + /** + * Properties of a CreateWorkspaceRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICreateWorkspaceRequest + * @property {string|null} [parent] CreateWorkspaceRequest parent + * @property {google.cloud.dataform.v1alpha2.IWorkspace|null} [workspace] CreateWorkspaceRequest workspace + * @property {string|null} [workspaceId] CreateWorkspaceRequest workspaceId + */ + + /** + * Constructs a new CreateWorkspaceRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CreateWorkspaceRequest. + * @implements ICreateWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest=} [properties] Properties to set + */ + function CreateWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateWorkspaceRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.parent = ""; + + /** + * CreateWorkspaceRequest workspace. + * @member {google.cloud.dataform.v1alpha2.IWorkspace|null|undefined} workspace + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.workspace = null; + + /** + * CreateWorkspaceRequest workspaceId. + * @member {string} workspaceId + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.workspaceId = ""; + + /** + * Creates a new CreateWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CreateWorkspaceRequest} CreateWorkspaceRequest instance + */ + CreateWorkspaceRequest.create = function create(properties) { + return new CreateWorkspaceRequest(properties); + }; + + /** + * Encodes the specified CreateWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest} message CreateWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkspaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + $root.google.cloud.dataform.v1alpha2.Workspace.encode(message.workspace, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.workspaceId != null && Object.hasOwnProperty.call(message, "workspaceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workspaceId); + return writer; + }; + + /** + * Encodes the specified CreateWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest} message CreateWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CreateWorkspaceRequest} CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.workspace = $root.google.cloud.dataform.v1alpha2.Workspace.decode(reader, reader.uint32()); + break; + } + case 3: { + message.workspaceId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CreateWorkspaceRequest} CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWorkspaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) { + var error = $root.google.cloud.dataform.v1alpha2.Workspace.verify(message.workspace); + if (error) + return "workspace." + error; + } + if (message.workspaceId != null && message.hasOwnProperty("workspaceId")) + if (!$util.isString(message.workspaceId)) + return "workspaceId: string expected"; + return null; + }; + + /** + * Creates a CreateWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CreateWorkspaceRequest} CreateWorkspaceRequest + */ + CreateWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.workspace != null) { + if (typeof object.workspace !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CreateWorkspaceRequest.workspace: object expected"); + message.workspace = $root.google.cloud.dataform.v1alpha2.Workspace.fromObject(object.workspace); + } + if (object.workspaceId != null) + message.workspaceId = String(object.workspaceId); + return message; + }; + + /** + * Creates a plain object from a CreateWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.CreateWorkspaceRequest} message CreateWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.workspace = null; + object.workspaceId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = $root.google.cloud.dataform.v1alpha2.Workspace.toObject(message.workspace, options); + if (message.workspaceId != null && message.hasOwnProperty("workspaceId")) + object.workspaceId = message.workspaceId; + return object; + }; + + /** + * Converts this CreateWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CreateWorkspaceRequest"; + }; + + return CreateWorkspaceRequest; + })(); + + v1alpha2.DeleteWorkspaceRequest = (function() { + + /** + * Properties of a DeleteWorkspaceRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IDeleteWorkspaceRequest + * @property {string|null} [name] DeleteWorkspaceRequest name + */ + + /** + * Constructs a new DeleteWorkspaceRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a DeleteWorkspaceRequest. + * @implements IDeleteWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest=} [properties] Properties to set + */ + function DeleteWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @instance + */ + DeleteWorkspaceRequest.prototype.name = ""; + + /** + * Creates a new DeleteWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest} DeleteWorkspaceRequest instance + */ + DeleteWorkspaceRequest.create = function create(properties) { + return new DeleteWorkspaceRequest(properties); + }; + + /** + * Encodes the specified DeleteWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest} message DeleteWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkspaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest} message DeleteWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest} DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest} DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteWorkspaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest} DeleteWorkspaceRequest + */ + DeleteWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest} message DeleteWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest"; + }; + + return DeleteWorkspaceRequest; + })(); + + v1alpha2.CommitAuthor = (function() { + + /** + * Properties of a CommitAuthor. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICommitAuthor + * @property {string|null} [name] CommitAuthor name + * @property {string|null} [emailAddress] CommitAuthor emailAddress + */ + + /** + * Constructs a new CommitAuthor. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CommitAuthor. + * @implements ICommitAuthor + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICommitAuthor=} [properties] Properties to set + */ + function CommitAuthor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitAuthor name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @instance + */ + CommitAuthor.prototype.name = ""; + + /** + * CommitAuthor emailAddress. + * @member {string} emailAddress + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @instance + */ + CommitAuthor.prototype.emailAddress = ""; + + /** + * Creates a new CommitAuthor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {google.cloud.dataform.v1alpha2.ICommitAuthor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CommitAuthor} CommitAuthor instance + */ + CommitAuthor.create = function create(properties) { + return new CommitAuthor(properties); + }; + + /** + * Encodes the specified CommitAuthor message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitAuthor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {google.cloud.dataform.v1alpha2.ICommitAuthor} message CommitAuthor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitAuthor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.emailAddress != null && Object.hasOwnProperty.call(message, "emailAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.emailAddress); + return writer; + }; + + /** + * Encodes the specified CommitAuthor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitAuthor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {google.cloud.dataform.v1alpha2.ICommitAuthor} message CommitAuthor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitAuthor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CommitAuthor} CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitAuthor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CommitAuthor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.emailAddress = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CommitAuthor} CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitAuthor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitAuthor message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitAuthor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) + if (!$util.isString(message.emailAddress)) + return "emailAddress: string expected"; + return null; + }; + + /** + * Creates a CommitAuthor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CommitAuthor} CommitAuthor + */ + CommitAuthor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CommitAuthor) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CommitAuthor(); + if (object.name != null) + message.name = String(object.name); + if (object.emailAddress != null) + message.emailAddress = String(object.emailAddress); + return message; + }; + + /** + * Creates a plain object from a CommitAuthor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {google.cloud.dataform.v1alpha2.CommitAuthor} message CommitAuthor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitAuthor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.emailAddress = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) + object.emailAddress = message.emailAddress; + return object; + }; + + /** + * Converts this CommitAuthor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @instance + * @returns {Object.} JSON object + */ + CommitAuthor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommitAuthor + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommitAuthor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CommitAuthor"; + }; + + return CommitAuthor; + })(); + + v1alpha2.PullGitCommitsRequest = (function() { + + /** + * Properties of a PullGitCommitsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IPullGitCommitsRequest + * @property {string|null} [name] PullGitCommitsRequest name + * @property {string|null} [remoteBranch] PullGitCommitsRequest remoteBranch + * @property {google.cloud.dataform.v1alpha2.ICommitAuthor|null} [author] PullGitCommitsRequest author + */ + + /** + * Constructs a new PullGitCommitsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a PullGitCommitsRequest. + * @implements IPullGitCommitsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IPullGitCommitsRequest=} [properties] Properties to set + */ + function PullGitCommitsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PullGitCommitsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.name = ""; + + /** + * PullGitCommitsRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.remoteBranch = ""; + + /** + * PullGitCommitsRequest author. + * @member {google.cloud.dataform.v1alpha2.ICommitAuthor|null|undefined} author + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.author = null; + + /** + * Creates a new PullGitCommitsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IPullGitCommitsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.PullGitCommitsRequest} PullGitCommitsRequest instance + */ + PullGitCommitsRequest.create = function create(properties) { + return new PullGitCommitsRequest(properties); + }; + + /** + * Encodes the specified PullGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.PullGitCommitsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IPullGitCommitsRequest} message PullGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullGitCommitsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + $root.google.cloud.dataform.v1alpha2.CommitAuthor.encode(message.author, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PullGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.PullGitCommitsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IPullGitCommitsRequest} message PullGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullGitCommitsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.PullGitCommitsRequest} PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullGitCommitsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.PullGitCommitsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteBranch = reader.string(); + break; + } + case 3: { + message.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.PullGitCommitsRequest} PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullGitCommitsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PullGitCommitsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullGitCommitsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + if (message.author != null && message.hasOwnProperty("author")) { + var error = $root.google.cloud.dataform.v1alpha2.CommitAuthor.verify(message.author); + if (error) + return "author." + error; + } + return null; + }; + + /** + * Creates a PullGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.PullGitCommitsRequest} PullGitCommitsRequest + */ + PullGitCommitsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.PullGitCommitsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.PullGitCommitsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + if (object.author != null) { + if (typeof object.author !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.PullGitCommitsRequest.author: object expected"); + message.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.fromObject(object.author); + } + return message; + }; + + /** + * Creates a plain object from a PullGitCommitsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.PullGitCommitsRequest} message PullGitCommitsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullGitCommitsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + object.author = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + if (message.author != null && message.hasOwnProperty("author")) + object.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.toObject(message.author, options); + return object; + }; + + /** + * Converts this PullGitCommitsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @instance + * @returns {Object.} JSON object + */ + PullGitCommitsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PullGitCommitsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PullGitCommitsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.PullGitCommitsRequest"; + }; + + return PullGitCommitsRequest; + })(); + + v1alpha2.PushGitCommitsRequest = (function() { + + /** + * Properties of a PushGitCommitsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IPushGitCommitsRequest + * @property {string|null} [name] PushGitCommitsRequest name + * @property {string|null} [remoteBranch] PushGitCommitsRequest remoteBranch + */ + + /** + * Constructs a new PushGitCommitsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a PushGitCommitsRequest. + * @implements IPushGitCommitsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IPushGitCommitsRequest=} [properties] Properties to set + */ + function PushGitCommitsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PushGitCommitsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @instance + */ + PushGitCommitsRequest.prototype.name = ""; + + /** + * PushGitCommitsRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @instance + */ + PushGitCommitsRequest.prototype.remoteBranch = ""; + + /** + * Creates a new PushGitCommitsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IPushGitCommitsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.PushGitCommitsRequest} PushGitCommitsRequest instance + */ + PushGitCommitsRequest.create = function create(properties) { + return new PushGitCommitsRequest(properties); + }; + + /** + * Encodes the specified PushGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.PushGitCommitsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IPushGitCommitsRequest} message PushGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushGitCommitsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + return writer; + }; + + /** + * Encodes the specified PushGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.PushGitCommitsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IPushGitCommitsRequest} message PushGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushGitCommitsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.PushGitCommitsRequest} PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushGitCommitsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.PushGitCommitsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteBranch = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.PushGitCommitsRequest} PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushGitCommitsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PushGitCommitsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PushGitCommitsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + return null; + }; + + /** + * Creates a PushGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.PushGitCommitsRequest} PushGitCommitsRequest + */ + PushGitCommitsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.PushGitCommitsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.PushGitCommitsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + return message; + }; + + /** + * Creates a plain object from a PushGitCommitsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.PushGitCommitsRequest} message PushGitCommitsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushGitCommitsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + return object; + }; + + /** + * Converts this PushGitCommitsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @instance + * @returns {Object.} JSON object + */ + PushGitCommitsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PushGitCommitsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PushGitCommitsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.PushGitCommitsRequest"; + }; + + return PushGitCommitsRequest; + })(); + + v1alpha2.FetchFileGitStatusesRequest = (function() { + + /** + * Properties of a FetchFileGitStatusesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchFileGitStatusesRequest + * @property {string|null} [name] FetchFileGitStatusesRequest name + */ + + /** + * Constructs a new FetchFileGitStatusesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchFileGitStatusesRequest. + * @implements IFetchFileGitStatusesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest=} [properties] Properties to set + */ + function FetchFileGitStatusesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileGitStatusesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @instance + */ + FetchFileGitStatusesRequest.prototype.name = ""; + + /** + * Creates a new FetchFileGitStatusesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest instance + */ + FetchFileGitStatusesRequest.create = function create(properties) { + return new FetchFileGitStatusesRequest(properties); + }; + + /** + * Encodes the specified FetchFileGitStatusesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest} message FetchFileGitStatusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified FetchFileGitStatusesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest} message FetchFileGitStatusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileGitStatusesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileGitStatusesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a FetchFileGitStatusesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + */ + FetchFileGitStatusesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FetchFileGitStatusesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest} message FetchFileGitStatusesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileGitStatusesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this FetchFileGitStatusesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchFileGitStatusesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchFileGitStatusesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileGitStatusesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest"; + }; + + return FetchFileGitStatusesRequest; + })(); + + v1alpha2.FetchFileGitStatusesResponse = (function() { + + /** + * Properties of a FetchFileGitStatusesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchFileGitStatusesResponse + * @property {Array.|null} [uncommittedFileChanges] FetchFileGitStatusesResponse uncommittedFileChanges + */ + + /** + * Constructs a new FetchFileGitStatusesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchFileGitStatusesResponse. + * @implements IFetchFileGitStatusesResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse=} [properties] Properties to set + */ + function FetchFileGitStatusesResponse(properties) { + this.uncommittedFileChanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileGitStatusesResponse uncommittedFileChanges. + * @member {Array.} uncommittedFileChanges + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @instance + */ + FetchFileGitStatusesResponse.prototype.uncommittedFileChanges = $util.emptyArray; + + /** + * Creates a new FetchFileGitStatusesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse instance + */ + FetchFileGitStatusesResponse.create = function create(properties) { + return new FetchFileGitStatusesResponse(properties); + }; + + /** + * Encodes the specified FetchFileGitStatusesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse} message FetchFileGitStatusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uncommittedFileChanges != null && message.uncommittedFileChanges.length) + for (var i = 0; i < message.uncommittedFileChanges.length; ++i) + $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.encode(message.uncommittedFileChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FetchFileGitStatusesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse} message FetchFileGitStatusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.uncommittedFileChanges && message.uncommittedFileChanges.length)) + message.uncommittedFileChanges = []; + message.uncommittedFileChanges.push($root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileGitStatusesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileGitStatusesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uncommittedFileChanges != null && message.hasOwnProperty("uncommittedFileChanges")) { + if (!Array.isArray(message.uncommittedFileChanges)) + return "uncommittedFileChanges: array expected"; + for (var i = 0; i < message.uncommittedFileChanges.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.verify(message.uncommittedFileChanges[i]); + if (error) + return "uncommittedFileChanges." + error; + } + } + return null; + }; + + /** + * Creates a FetchFileGitStatusesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + */ + FetchFileGitStatusesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse(); + if (object.uncommittedFileChanges) { + if (!Array.isArray(object.uncommittedFileChanges)) + throw TypeError(".google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.uncommittedFileChanges: array expected"); + message.uncommittedFileChanges = []; + for (var i = 0; i < object.uncommittedFileChanges.length; ++i) { + if (typeof object.uncommittedFileChanges[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.uncommittedFileChanges: object expected"); + message.uncommittedFileChanges[i] = $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.fromObject(object.uncommittedFileChanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FetchFileGitStatusesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse} message FetchFileGitStatusesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileGitStatusesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uncommittedFileChanges = []; + if (message.uncommittedFileChanges && message.uncommittedFileChanges.length) { + object.uncommittedFileChanges = []; + for (var j = 0; j < message.uncommittedFileChanges.length; ++j) + object.uncommittedFileChanges[j] = $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.toObject(message.uncommittedFileChanges[j], options); + } + return object; + }; + + /** + * Converts this FetchFileGitStatusesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchFileGitStatusesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchFileGitStatusesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileGitStatusesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse"; + }; + + FetchFileGitStatusesResponse.UncommittedFileChange = (function() { + + /** + * Properties of an UncommittedFileChange. + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @interface IUncommittedFileChange + * @property {string|null} [path] UncommittedFileChange path + * @property {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State|null} [state] UncommittedFileChange state + */ + + /** + * Constructs a new UncommittedFileChange. + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @classdesc Represents an UncommittedFileChange. + * @implements IUncommittedFileChange + * @constructor + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange=} [properties] Properties to set + */ + function UncommittedFileChange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UncommittedFileChange path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + */ + UncommittedFileChange.prototype.path = ""; + + /** + * UncommittedFileChange state. + * @member {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State} state + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + */ + UncommittedFileChange.prototype.state = 0; + + /** + * Creates a new UncommittedFileChange instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange instance + */ + UncommittedFileChange.create = function create(properties) { + return new UncommittedFileChange(properties); + }; + + /** + * Encodes the specified UncommittedFileChange message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange} message UncommittedFileChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UncommittedFileChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + return writer; + }; + + /** + * Encodes the specified UncommittedFileChange message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange} message UncommittedFileChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UncommittedFileChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UncommittedFileChange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.path = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UncommittedFileChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UncommittedFileChange message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UncommittedFileChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates an UncommittedFileChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + */ + UncommittedFileChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange(); + if (object.path != null) + message.path = String(object.path); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ADDED": + case 1: + message.state = 1; + break; + case "DELETED": + case 2: + message.state = 2; + break; + case "MODIFIED": + case 3: + message.state = 3; + break; + case "HAS_CONFLICTS": + case 4: + message.state = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from an UncommittedFileChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange} message UncommittedFileChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UncommittedFileChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.path = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] === undefined ? message.state : $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] : message.state; + return object; + }; + + /** + * Converts this UncommittedFileChange to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + * @returns {Object.} JSON object + */ + UncommittedFileChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UncommittedFileChange + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UncommittedFileChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange"; + }; + + /** + * State enum. + * @name google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ADDED=1 ADDED value + * @property {number} DELETED=2 DELETED value + * @property {number} MODIFIED=3 MODIFIED value + * @property {number} HAS_CONFLICTS=4 HAS_CONFLICTS value + */ + UncommittedFileChange.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADDED"] = 1; + values[valuesById[2] = "DELETED"] = 2; + values[valuesById[3] = "MODIFIED"] = 3; + values[valuesById[4] = "HAS_CONFLICTS"] = 4; + return values; + })(); + + return UncommittedFileChange; + })(); + + return FetchFileGitStatusesResponse; + })(); + + v1alpha2.FetchGitAheadBehindRequest = (function() { + + /** + * Properties of a FetchGitAheadBehindRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchGitAheadBehindRequest + * @property {string|null} [name] FetchGitAheadBehindRequest name + * @property {string|null} [remoteBranch] FetchGitAheadBehindRequest remoteBranch + */ + + /** + * Constructs a new FetchGitAheadBehindRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchGitAheadBehindRequest. + * @implements IFetchGitAheadBehindRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest=} [properties] Properties to set + */ + function FetchGitAheadBehindRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchGitAheadBehindRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @instance + */ + FetchGitAheadBehindRequest.prototype.name = ""; + + /** + * FetchGitAheadBehindRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @instance + */ + FetchGitAheadBehindRequest.prototype.remoteBranch = ""; + + /** + * Creates a new FetchGitAheadBehindRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest instance + */ + FetchGitAheadBehindRequest.create = function create(properties) { + return new FetchGitAheadBehindRequest(properties); + }; + + /** + * Encodes the specified FetchGitAheadBehindRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest} message FetchGitAheadBehindRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + return writer; + }; + + /** + * Encodes the specified FetchGitAheadBehindRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest} message FetchGitAheadBehindRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteBranch = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchGitAheadBehindRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchGitAheadBehindRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + return null; + }; + + /** + * Creates a FetchGitAheadBehindRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + */ + FetchGitAheadBehindRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + return message; + }; + + /** + * Creates a plain object from a FetchGitAheadBehindRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest} message FetchGitAheadBehindRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchGitAheadBehindRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + return object; + }; + + /** + * Converts this FetchGitAheadBehindRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @instance + * @returns {Object.} JSON object + */ + FetchGitAheadBehindRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchGitAheadBehindRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchGitAheadBehindRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest"; + }; + + return FetchGitAheadBehindRequest; + })(); + + v1alpha2.FetchGitAheadBehindResponse = (function() { + + /** + * Properties of a FetchGitAheadBehindResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchGitAheadBehindResponse + * @property {number|null} [commitsAhead] FetchGitAheadBehindResponse commitsAhead + * @property {number|null} [commitsBehind] FetchGitAheadBehindResponse commitsBehind + */ + + /** + * Constructs a new FetchGitAheadBehindResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchGitAheadBehindResponse. + * @implements IFetchGitAheadBehindResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse=} [properties] Properties to set + */ + function FetchGitAheadBehindResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchGitAheadBehindResponse commitsAhead. + * @member {number} commitsAhead + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @instance + */ + FetchGitAheadBehindResponse.prototype.commitsAhead = 0; + + /** + * FetchGitAheadBehindResponse commitsBehind. + * @member {number} commitsBehind + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @instance + */ + FetchGitAheadBehindResponse.prototype.commitsBehind = 0; + + /** + * Creates a new FetchGitAheadBehindResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse instance + */ + FetchGitAheadBehindResponse.create = function create(properties) { + return new FetchGitAheadBehindResponse(properties); + }; + + /** + * Encodes the specified FetchGitAheadBehindResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse} message FetchGitAheadBehindResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commitsAhead != null && Object.hasOwnProperty.call(message, "commitsAhead")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.commitsAhead); + if (message.commitsBehind != null && Object.hasOwnProperty.call(message, "commitsBehind")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.commitsBehind); + return writer; + }; + + /** + * Encodes the specified FetchGitAheadBehindResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse} message FetchGitAheadBehindResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.commitsAhead = reader.int32(); + break; + } + case 2: { + message.commitsBehind = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchGitAheadBehindResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchGitAheadBehindResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commitsAhead != null && message.hasOwnProperty("commitsAhead")) + if (!$util.isInteger(message.commitsAhead)) + return "commitsAhead: integer expected"; + if (message.commitsBehind != null && message.hasOwnProperty("commitsBehind")) + if (!$util.isInteger(message.commitsBehind)) + return "commitsBehind: integer expected"; + return null; + }; + + /** + * Creates a FetchGitAheadBehindResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + */ + FetchGitAheadBehindResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse(); + if (object.commitsAhead != null) + message.commitsAhead = object.commitsAhead | 0; + if (object.commitsBehind != null) + message.commitsBehind = object.commitsBehind | 0; + return message; + }; + + /** + * Creates a plain object from a FetchGitAheadBehindResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse} message FetchGitAheadBehindResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchGitAheadBehindResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.commitsAhead = 0; + object.commitsBehind = 0; + } + if (message.commitsAhead != null && message.hasOwnProperty("commitsAhead")) + object.commitsAhead = message.commitsAhead; + if (message.commitsBehind != null && message.hasOwnProperty("commitsBehind")) + object.commitsBehind = message.commitsBehind; + return object; + }; + + /** + * Converts this FetchGitAheadBehindResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @instance + * @returns {Object.} JSON object + */ + FetchGitAheadBehindResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchGitAheadBehindResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchGitAheadBehindResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse"; + }; + + return FetchGitAheadBehindResponse; + })(); + + v1alpha2.CommitWorkspaceChangesRequest = (function() { + + /** + * Properties of a CommitWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICommitWorkspaceChangesRequest + * @property {string|null} [name] CommitWorkspaceChangesRequest name + * @property {google.cloud.dataform.v1alpha2.ICommitAuthor|null} [author] CommitWorkspaceChangesRequest author + * @property {string|null} [commitMessage] CommitWorkspaceChangesRequest commitMessage + * @property {Array.|null} [paths] CommitWorkspaceChangesRequest paths + */ + + /** + * Constructs a new CommitWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CommitWorkspaceChangesRequest. + * @implements ICommitWorkspaceChangesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest=} [properties] Properties to set + */ + function CommitWorkspaceChangesRequest(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitWorkspaceChangesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.name = ""; + + /** + * CommitWorkspaceChangesRequest author. + * @member {google.cloud.dataform.v1alpha2.ICommitAuthor|null|undefined} author + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.author = null; + + /** + * CommitWorkspaceChangesRequest commitMessage. + * @member {string} commitMessage + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.commitMessage = ""; + + /** + * CommitWorkspaceChangesRequest paths. + * @member {Array.} paths + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.paths = $util.emptyArray; + + /** + * Creates a new CommitWorkspaceChangesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest instance + */ + CommitWorkspaceChangesRequest.create = function create(properties) { + return new CommitWorkspaceChangesRequest(properties); + }; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitWorkspaceChangesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.commitMessage != null && Object.hasOwnProperty.call(message, "commitMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commitMessage); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.paths[i]); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + $root.google.cloud.dataform.v1alpha2.CommitAuthor.encode(message.author, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitWorkspaceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitWorkspaceChangesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 4: { + message.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.decode(reader, reader.uint32()); + break; + } + case 2: { + message.commitMessage = reader.string(); + break; + } + case 3: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitWorkspaceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitWorkspaceChangesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitWorkspaceChangesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.author != null && message.hasOwnProperty("author")) { + var error = $root.google.cloud.dataform.v1alpha2.CommitAuthor.verify(message.author); + if (error) + return "author." + error; + } + if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) + if (!$util.isString(message.commitMessage)) + return "commitMessage: string expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a CommitWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + */ + CommitWorkspaceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.author != null) { + if (typeof object.author !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.author: object expected"); + message.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.fromObject(object.author); + } + if (object.commitMessage != null) + message.commitMessage = String(object.commitMessage); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a CommitWorkspaceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitWorkspaceChangesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.name = ""; + object.commitMessage = ""; + object.author = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) + object.commitMessage = message.commitMessage; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.author != null && message.hasOwnProperty("author")) + object.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.toObject(message.author, options); + return object; + }; + + /** + * Converts this CommitWorkspaceChangesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + CommitWorkspaceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommitWorkspaceChangesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommitWorkspaceChangesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest"; + }; + + return CommitWorkspaceChangesRequest; + })(); + + v1alpha2.ResetWorkspaceChangesRequest = (function() { + + /** + * Properties of a ResetWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IResetWorkspaceChangesRequest + * @property {string|null} [name] ResetWorkspaceChangesRequest name + * @property {Array.|null} [paths] ResetWorkspaceChangesRequest paths + * @property {boolean|null} [clean] ResetWorkspaceChangesRequest clean + */ + + /** + * Constructs a new ResetWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ResetWorkspaceChangesRequest. + * @implements IResetWorkspaceChangesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest=} [properties] Properties to set + */ + function ResetWorkspaceChangesRequest(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResetWorkspaceChangesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.name = ""; + + /** + * ResetWorkspaceChangesRequest paths. + * @member {Array.} paths + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.paths = $util.emptyArray; + + /** + * ResetWorkspaceChangesRequest clean. + * @member {boolean} clean + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.clean = false; + + /** + * Creates a new ResetWorkspaceChangesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest instance + */ + ResetWorkspaceChangesRequest.create = function create(properties) { + return new ResetWorkspaceChangesRequest(properties); + }; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetWorkspaceChangesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.paths[i]); + if (message.clean != null && Object.hasOwnProperty.call(message, "clean")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.clean); + return writer; + }; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetWorkspaceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetWorkspaceChangesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + case 3: { + message.clean = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetWorkspaceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResetWorkspaceChangesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResetWorkspaceChangesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + if (message.clean != null && message.hasOwnProperty("clean")) + if (typeof message.clean !== "boolean") + return "clean: boolean expected"; + return null; + }; + + /** + * Creates a ResetWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + */ + ResetWorkspaceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + if (object.clean != null) + message.clean = Boolean(object.clean); + return message; + }; + + /** + * Creates a plain object from a ResetWorkspaceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResetWorkspaceChangesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.name = ""; + object.clean = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.clean != null && message.hasOwnProperty("clean")) + object.clean = message.clean; + return object; + }; + + /** + * Converts this ResetWorkspaceChangesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + ResetWorkspaceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResetWorkspaceChangesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResetWorkspaceChangesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest"; + }; + + return ResetWorkspaceChangesRequest; + })(); + + v1alpha2.FetchFileDiffRequest = (function() { + + /** + * Properties of a FetchFileDiffRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchFileDiffRequest + * @property {string|null} [workspace] FetchFileDiffRequest workspace + * @property {string|null} [path] FetchFileDiffRequest path + */ + + /** + * Constructs a new FetchFileDiffRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchFileDiffRequest. + * @implements IFetchFileDiffRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffRequest=} [properties] Properties to set + */ + function FetchFileDiffRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileDiffRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @instance + */ + FetchFileDiffRequest.prototype.workspace = ""; + + /** + * FetchFileDiffRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @instance + */ + FetchFileDiffRequest.prototype.path = ""; + + /** + * Creates a new FetchFileDiffRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffRequest} FetchFileDiffRequest instance + */ + FetchFileDiffRequest.create = function create(properties) { + return new FetchFileDiffRequest(properties); + }; + + /** + * Encodes the specified FetchFileDiffRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffRequest} message FetchFileDiffRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified FetchFileDiffRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffRequest} message FetchFileDiffRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffRequest} FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchFileDiffRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffRequest} FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileDiffRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileDiffRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a FetchFileDiffRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffRequest} FetchFileDiffRequest + */ + FetchFileDiffRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchFileDiffRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchFileDiffRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a FetchFileDiffRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileDiffRequest} message FetchFileDiffRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileDiffRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this FetchFileDiffRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @instance + * @returns {Object.} JSON object + */ + FetchFileDiffRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchFileDiffRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileDiffRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchFileDiffRequest"; + }; + + return FetchFileDiffRequest; + })(); + + v1alpha2.FetchFileDiffResponse = (function() { + + /** + * Properties of a FetchFileDiffResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchFileDiffResponse + * @property {string|null} [formattedDiff] FetchFileDiffResponse formattedDiff + */ + + /** + * Constructs a new FetchFileDiffResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchFileDiffResponse. + * @implements IFetchFileDiffResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffResponse=} [properties] Properties to set + */ + function FetchFileDiffResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileDiffResponse formattedDiff. + * @member {string} formattedDiff + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @instance + */ + FetchFileDiffResponse.prototype.formattedDiff = ""; + + /** + * Creates a new FetchFileDiffResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffResponse} FetchFileDiffResponse instance + */ + FetchFileDiffResponse.create = function create(properties) { + return new FetchFileDiffResponse(properties); + }; + + /** + * Encodes the specified FetchFileDiffResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffResponse} message FetchFileDiffResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.formattedDiff != null && Object.hasOwnProperty.call(message, "formattedDiff")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.formattedDiff); + return writer; + }; + + /** + * Encodes the specified FetchFileDiffResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffResponse} message FetchFileDiffResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffResponse} FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchFileDiffResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.formattedDiff = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffResponse} FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileDiffResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileDiffResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.formattedDiff != null && message.hasOwnProperty("formattedDiff")) + if (!$util.isString(message.formattedDiff)) + return "formattedDiff: string expected"; + return null; + }; + + /** + * Creates a FetchFileDiffResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffResponse} FetchFileDiffResponse + */ + FetchFileDiffResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchFileDiffResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchFileDiffResponse(); + if (object.formattedDiff != null) + message.formattedDiff = String(object.formattedDiff); + return message; + }; + + /** + * Creates a plain object from a FetchFileDiffResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileDiffResponse} message FetchFileDiffResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileDiffResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.formattedDiff = ""; + if (message.formattedDiff != null && message.hasOwnProperty("formattedDiff")) + object.formattedDiff = message.formattedDiff; + return object; + }; + + /** + * Converts this FetchFileDiffResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @instance + * @returns {Object.} JSON object + */ + FetchFileDiffResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchFileDiffResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileDiffResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchFileDiffResponse"; + }; + + return FetchFileDiffResponse; + })(); + + v1alpha2.QueryDirectoryContentsRequest = (function() { + + /** + * Properties of a QueryDirectoryContentsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IQueryDirectoryContentsRequest + * @property {string|null} [workspace] QueryDirectoryContentsRequest workspace + * @property {string|null} [path] QueryDirectoryContentsRequest path + * @property {number|null} [pageSize] QueryDirectoryContentsRequest pageSize + * @property {string|null} [pageToken] QueryDirectoryContentsRequest pageToken + */ + + /** + * Constructs a new QueryDirectoryContentsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a QueryDirectoryContentsRequest. + * @implements IQueryDirectoryContentsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest=} [properties] Properties to set + */ + function QueryDirectoryContentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDirectoryContentsRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.workspace = ""; + + /** + * QueryDirectoryContentsRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.path = ""; + + /** + * QueryDirectoryContentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.pageSize = 0; + + /** + * QueryDirectoryContentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.pageToken = ""; + + /** + * Creates a new QueryDirectoryContentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest instance + */ + QueryDirectoryContentsRequest.create = function create(properties) { + return new QueryDirectoryContentsRequest(properties); + }; + + /** + * Encodes the specified QueryDirectoryContentsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest} message QueryDirectoryContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified QueryDirectoryContentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest} message QueryDirectoryContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDirectoryContentsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDirectoryContentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a QueryDirectoryContentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + */ + QueryDirectoryContentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a QueryDirectoryContentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest} message QueryDirectoryContentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDirectoryContentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this QueryDirectoryContentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDirectoryContentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryDirectoryContentsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryDirectoryContentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest"; + }; + + return QueryDirectoryContentsRequest; + })(); + + v1alpha2.QueryDirectoryContentsResponse = (function() { + + /** + * Properties of a QueryDirectoryContentsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IQueryDirectoryContentsResponse + * @property {Array.|null} [directoryEntries] QueryDirectoryContentsResponse directoryEntries + * @property {string|null} [nextPageToken] QueryDirectoryContentsResponse nextPageToken + */ + + /** + * Constructs a new QueryDirectoryContentsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a QueryDirectoryContentsResponse. + * @implements IQueryDirectoryContentsResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse=} [properties] Properties to set + */ + function QueryDirectoryContentsResponse(properties) { + this.directoryEntries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDirectoryContentsResponse directoryEntries. + * @member {Array.} directoryEntries + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @instance + */ + QueryDirectoryContentsResponse.prototype.directoryEntries = $util.emptyArray; + + /** + * QueryDirectoryContentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @instance + */ + QueryDirectoryContentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryDirectoryContentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse instance + */ + QueryDirectoryContentsResponse.create = function create(properties) { + return new QueryDirectoryContentsResponse(properties); + }; + + /** + * Encodes the specified QueryDirectoryContentsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse} message QueryDirectoryContentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.directoryEntries != null && message.directoryEntries.length) + for (var i = 0; i < message.directoryEntries.length; ++i) + $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.encode(message.directoryEntries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified QueryDirectoryContentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse} message QueryDirectoryContentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.directoryEntries && message.directoryEntries.length)) + message.directoryEntries = []; + message.directoryEntries.push($root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDirectoryContentsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDirectoryContentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.directoryEntries != null && message.hasOwnProperty("directoryEntries")) { + if (!Array.isArray(message.directoryEntries)) + return "directoryEntries: array expected"; + for (var i = 0; i < message.directoryEntries.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.verify(message.directoryEntries[i]); + if (error) + return "directoryEntries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryDirectoryContentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + */ + QueryDirectoryContentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse(); + if (object.directoryEntries) { + if (!Array.isArray(object.directoryEntries)) + throw TypeError(".google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.directoryEntries: array expected"); + message.directoryEntries = []; + for (var i = 0; i < object.directoryEntries.length; ++i) { + if (typeof object.directoryEntries[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.directoryEntries: object expected"); + message.directoryEntries[i] = $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.fromObject(object.directoryEntries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryDirectoryContentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse} message QueryDirectoryContentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDirectoryContentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.directoryEntries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.directoryEntries && message.directoryEntries.length) { + object.directoryEntries = []; + for (var j = 0; j < message.directoryEntries.length; ++j) + object.directoryEntries[j] = $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.toObject(message.directoryEntries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryDirectoryContentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDirectoryContentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryDirectoryContentsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryDirectoryContentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse"; + }; + + QueryDirectoryContentsResponse.DirectoryEntry = (function() { + + /** + * Properties of a DirectoryEntry. + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @interface IDirectoryEntry + * @property {string|null} [file] DirectoryEntry file + * @property {string|null} [directory] DirectoryEntry directory + */ + + /** + * Constructs a new DirectoryEntry. + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @classdesc Represents a DirectoryEntry. + * @implements IDirectoryEntry + * @constructor + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry=} [properties] Properties to set + */ + function DirectoryEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DirectoryEntry file. + * @member {string|null|undefined} file + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + DirectoryEntry.prototype.file = null; + + /** + * DirectoryEntry directory. + * @member {string|null|undefined} directory + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + DirectoryEntry.prototype.directory = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DirectoryEntry entry. + * @member {"file"|"directory"|undefined} entry + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + Object.defineProperty(DirectoryEntry.prototype, "entry", { + get: $util.oneOfGetter($oneOfFields = ["file", "directory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DirectoryEntry instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry instance + */ + DirectoryEntry.create = function create(properties) { + return new DirectoryEntry(properties); + }; + + /** + * Encodes the specified DirectoryEntry message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry} message DirectoryEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectoryEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); + if (message.directory != null && Object.hasOwnProperty.call(message, "directory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.directory); + return writer; + }; + + /** + * Encodes the specified DirectoryEntry message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry} message DirectoryEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectoryEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectoryEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.file = reader.string(); + break; + } + case 2: { + message.directory = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectoryEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DirectoryEntry message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DirectoryEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.file != null && message.hasOwnProperty("file")) { + properties.entry = 1; + if (!$util.isString(message.file)) + return "file: string expected"; + } + if (message.directory != null && message.hasOwnProperty("directory")) { + if (properties.entry === 1) + return "entry: multiple values"; + properties.entry = 1; + if (!$util.isString(message.directory)) + return "directory: string expected"; + } + return null; + }; + + /** + * Creates a DirectoryEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + */ + DirectoryEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry(); + if (object.file != null) + message.file = String(object.file); + if (object.directory != null) + message.directory = String(object.directory); + return message; + }; + + /** + * Creates a plain object from a DirectoryEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry} message DirectoryEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DirectoryEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.file != null && message.hasOwnProperty("file")) { + object.file = message.file; + if (options.oneofs) + object.entry = "file"; + } + if (message.directory != null && message.hasOwnProperty("directory")) { + object.directory = message.directory; + if (options.oneofs) + object.entry = "directory"; + } + return object; + }; + + /** + * Converts this DirectoryEntry to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + * @returns {Object.} JSON object + */ + DirectoryEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DirectoryEntry + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DirectoryEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry"; + }; + + return DirectoryEntry; + })(); + + return QueryDirectoryContentsResponse; + })(); + + v1alpha2.MakeDirectoryRequest = (function() { + + /** + * Properties of a MakeDirectoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IMakeDirectoryRequest + * @property {string|null} [workspace] MakeDirectoryRequest workspace + * @property {string|null} [path] MakeDirectoryRequest path + */ + + /** + * Constructs a new MakeDirectoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a MakeDirectoryRequest. + * @implements IMakeDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryRequest=} [properties] Properties to set + */ + function MakeDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MakeDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @instance + */ + MakeDirectoryRequest.prototype.workspace = ""; + + /** + * MakeDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @instance + */ + MakeDirectoryRequest.prototype.path = ""; + + /** + * Creates a new MakeDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryRequest} MakeDirectoryRequest instance + */ + MakeDirectoryRequest.create = function create(properties) { + return new MakeDirectoryRequest(properties); + }; + + /** + * Encodes the specified MakeDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryRequest} message MakeDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified MakeDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryRequest} message MakeDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryRequest} MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.MakeDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryRequest} MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MakeDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MakeDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a MakeDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryRequest} MakeDirectoryRequest + */ + MakeDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.MakeDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.MakeDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a MakeDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.MakeDirectoryRequest} message MakeDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MakeDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this MakeDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + MakeDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MakeDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MakeDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.MakeDirectoryRequest"; + }; + + return MakeDirectoryRequest; + })(); + + v1alpha2.MakeDirectoryResponse = (function() { + + /** + * Properties of a MakeDirectoryResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IMakeDirectoryResponse + */ + + /** + * Constructs a new MakeDirectoryResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a MakeDirectoryResponse. + * @implements IMakeDirectoryResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryResponse=} [properties] Properties to set + */ + function MakeDirectoryResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MakeDirectoryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryResponse} MakeDirectoryResponse instance + */ + MakeDirectoryResponse.create = function create(properties) { + return new MakeDirectoryResponse(properties); + }; + + /** + * Encodes the specified MakeDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryResponse} message MakeDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MakeDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryResponse} message MakeDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryResponse} MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.MakeDirectoryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryResponse} MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MakeDirectoryResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MakeDirectoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MakeDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryResponse} MakeDirectoryResponse + */ + MakeDirectoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.MakeDirectoryResponse) + return object; + return new $root.google.cloud.dataform.v1alpha2.MakeDirectoryResponse(); + }; + + /** + * Creates a plain object from a MakeDirectoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.MakeDirectoryResponse} message MakeDirectoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MakeDirectoryResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MakeDirectoryResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @instance + * @returns {Object.} JSON object + */ + MakeDirectoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MakeDirectoryResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MakeDirectoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.MakeDirectoryResponse"; + }; + + return MakeDirectoryResponse; + })(); + + v1alpha2.RemoveDirectoryRequest = (function() { + + /** + * Properties of a RemoveDirectoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IRemoveDirectoryRequest + * @property {string|null} [workspace] RemoveDirectoryRequest workspace + * @property {string|null} [path] RemoveDirectoryRequest path + */ + + /** + * Constructs a new RemoveDirectoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a RemoveDirectoryRequest. + * @implements IRemoveDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest=} [properties] Properties to set + */ + function RemoveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @instance + */ + RemoveDirectoryRequest.prototype.workspace = ""; + + /** + * RemoveDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @instance + */ + RemoveDirectoryRequest.prototype.path = ""; + + /** + * Creates a new RemoveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.RemoveDirectoryRequest} RemoveDirectoryRequest instance + */ + RemoveDirectoryRequest.create = function create(properties) { + return new RemoveDirectoryRequest(properties); + }; + + /** + * Encodes the specified RemoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest} message RemoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified RemoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest} message RemoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.RemoveDirectoryRequest} RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.RemoveDirectoryRequest} RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a RemoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.RemoveDirectoryRequest} RemoveDirectoryRequest + */ + RemoveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a RemoveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.RemoveDirectoryRequest} message RemoveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this RemoveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.RemoveDirectoryRequest"; + }; + + return RemoveDirectoryRequest; + })(); + + v1alpha2.MoveDirectoryRequest = (function() { + + /** + * Properties of a MoveDirectoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IMoveDirectoryRequest + * @property {string|null} [workspace] MoveDirectoryRequest workspace + * @property {string|null} [path] MoveDirectoryRequest path + * @property {string|null} [newPath] MoveDirectoryRequest newPath + */ + + /** + * Constructs a new MoveDirectoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a MoveDirectoryRequest. + * @implements IMoveDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryRequest=} [properties] Properties to set + */ + function MoveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MoveDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.workspace = ""; + + /** + * MoveDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.path = ""; + + /** + * MoveDirectoryRequest newPath. + * @member {string} newPath + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.newPath = ""; + + /** + * Creates a new MoveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryRequest} MoveDirectoryRequest instance + */ + MoveDirectoryRequest.create = function create(properties) { + return new MoveDirectoryRequest(properties); + }; + + /** + * Encodes the specified MoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryRequest} message MoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.newPath != null && Object.hasOwnProperty.call(message, "newPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newPath); + return writer; + }; + + /** + * Encodes the specified MoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryRequest} message MoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryRequest} MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.MoveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.newPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryRequest} MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.newPath != null && message.hasOwnProperty("newPath")) + if (!$util.isString(message.newPath)) + return "newPath: string expected"; + return null; + }; + + /** + * Creates a MoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryRequest} MoveDirectoryRequest + */ + MoveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.MoveDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.MoveDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.newPath != null) + message.newPath = String(object.newPath); + return message; + }; + + /** + * Creates a plain object from a MoveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.MoveDirectoryRequest} message MoveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.newPath = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.newPath != null && message.hasOwnProperty("newPath")) + object.newPath = message.newPath; + return object; + }; + + /** + * Converts this MoveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + MoveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MoveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.MoveDirectoryRequest"; + }; + + return MoveDirectoryRequest; + })(); + + v1alpha2.MoveDirectoryResponse = (function() { + + /** + * Properties of a MoveDirectoryResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IMoveDirectoryResponse + */ + + /** + * Constructs a new MoveDirectoryResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a MoveDirectoryResponse. + * @implements IMoveDirectoryResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryResponse=} [properties] Properties to set + */ + function MoveDirectoryResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MoveDirectoryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryResponse} MoveDirectoryResponse instance + */ + MoveDirectoryResponse.create = function create(properties) { + return new MoveDirectoryResponse(properties); + }; + + /** + * Encodes the specified MoveDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryResponse} message MoveDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MoveDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryResponse} message MoveDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryResponse} MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.MoveDirectoryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryResponse} MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveDirectoryResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveDirectoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MoveDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryResponse} MoveDirectoryResponse + */ + MoveDirectoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.MoveDirectoryResponse) + return object; + return new $root.google.cloud.dataform.v1alpha2.MoveDirectoryResponse(); + }; + + /** + * Creates a plain object from a MoveDirectoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.MoveDirectoryResponse} message MoveDirectoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveDirectoryResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MoveDirectoryResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @instance + * @returns {Object.} JSON object + */ + MoveDirectoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MoveDirectoryResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveDirectoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.MoveDirectoryResponse"; + }; + + return MoveDirectoryResponse; + })(); + + v1alpha2.ReadFileRequest = (function() { + + /** + * Properties of a ReadFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IReadFileRequest + * @property {string|null} [workspace] ReadFileRequest workspace + * @property {string|null} [path] ReadFileRequest path + */ + + /** + * Constructs a new ReadFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ReadFileRequest. + * @implements IReadFileRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IReadFileRequest=} [properties] Properties to set + */ + function ReadFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @instance + */ + ReadFileRequest.prototype.workspace = ""; + + /** + * ReadFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @instance + */ + ReadFileRequest.prototype.path = ""; + + /** + * Creates a new ReadFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IReadFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ReadFileRequest} ReadFileRequest instance + */ + ReadFileRequest.create = function create(properties) { + return new ReadFileRequest(properties); + }; + + /** + * Encodes the specified ReadFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IReadFileRequest} message ReadFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified ReadFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IReadFileRequest} message ReadFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ReadFileRequest} ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ReadFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ReadFileRequest} ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a ReadFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ReadFileRequest} ReadFileRequest + */ + ReadFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ReadFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ReadFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a ReadFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ReadFileRequest} message ReadFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this ReadFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @instance + * @returns {Object.} JSON object + */ + ReadFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ReadFileRequest"; + }; + + return ReadFileRequest; + })(); + + v1alpha2.ReadFileResponse = (function() { + + /** + * Properties of a ReadFileResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IReadFileResponse + * @property {Uint8Array|null} [fileContents] ReadFileResponse fileContents + */ + + /** + * Constructs a new ReadFileResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ReadFileResponse. + * @implements IReadFileResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IReadFileResponse=} [properties] Properties to set + */ + function ReadFileResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadFileResponse fileContents. + * @member {Uint8Array} fileContents + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @instance + */ + ReadFileResponse.prototype.fileContents = $util.newBuffer([]); + + /** + * Creates a new ReadFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IReadFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ReadFileResponse} ReadFileResponse instance + */ + ReadFileResponse.create = function create(properties) { + return new ReadFileResponse(properties); + }; + + /** + * Encodes the specified ReadFileResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IReadFileResponse} message ReadFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileContents != null && Object.hasOwnProperty.call(message, "fileContents")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.fileContents); + return writer; + }; + + /** + * Encodes the specified ReadFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IReadFileResponse} message ReadFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ReadFileResponse} ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ReadFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fileContents = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ReadFileResponse} ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileContents != null && message.hasOwnProperty("fileContents")) + if (!(message.fileContents && typeof message.fileContents.length === "number" || $util.isString(message.fileContents))) + return "fileContents: buffer expected"; + return null; + }; + + /** + * Creates a ReadFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ReadFileResponse} ReadFileResponse + */ + ReadFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ReadFileResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ReadFileResponse(); + if (object.fileContents != null) + if (typeof object.fileContents === "string") + $util.base64.decode(object.fileContents, message.fileContents = $util.newBuffer($util.base64.length(object.fileContents)), 0); + else if (object.fileContents.length >= 0) + message.fileContents = object.fileContents; + return message; + }; + + /** + * Creates a plain object from a ReadFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.ReadFileResponse} message ReadFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadFileResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.fileContents = ""; + else { + object.fileContents = []; + if (options.bytes !== Array) + object.fileContents = $util.newBuffer(object.fileContents); + } + if (message.fileContents != null && message.hasOwnProperty("fileContents")) + object.fileContents = options.bytes === String ? $util.base64.encode(message.fileContents, 0, message.fileContents.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileContents) : message.fileContents; + return object; + }; + + /** + * Converts this ReadFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @instance + * @returns {Object.} JSON object + */ + ReadFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadFileResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ReadFileResponse"; + }; + + return ReadFileResponse; + })(); + + v1alpha2.RemoveFileRequest = (function() { + + /** + * Properties of a RemoveFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IRemoveFileRequest + * @property {string|null} [workspace] RemoveFileRequest workspace + * @property {string|null} [path] RemoveFileRequest path + */ + + /** + * Constructs a new RemoveFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a RemoveFileRequest. + * @implements IRemoveFileRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IRemoveFileRequest=} [properties] Properties to set + */ + function RemoveFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @instance + */ + RemoveFileRequest.prototype.workspace = ""; + + /** + * RemoveFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @instance + */ + RemoveFileRequest.prototype.path = ""; + + /** + * Creates a new RemoveFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IRemoveFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.RemoveFileRequest} RemoveFileRequest instance + */ + RemoveFileRequest.create = function create(properties) { + return new RemoveFileRequest(properties); + }; + + /** + * Encodes the specified RemoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IRemoveFileRequest} message RemoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified RemoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IRemoveFileRequest} message RemoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.RemoveFileRequest} RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.RemoveFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.RemoveFileRequest} RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a RemoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.RemoveFileRequest} RemoveFileRequest + */ + RemoveFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.RemoveFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.RemoveFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a RemoveFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.RemoveFileRequest} message RemoveFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this RemoveFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.RemoveFileRequest"; + }; + + return RemoveFileRequest; + })(); + + v1alpha2.MoveFileRequest = (function() { + + /** + * Properties of a MoveFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IMoveFileRequest + * @property {string|null} [workspace] MoveFileRequest workspace + * @property {string|null} [path] MoveFileRequest path + * @property {string|null} [newPath] MoveFileRequest newPath + */ + + /** + * Constructs a new MoveFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a MoveFileRequest. + * @implements IMoveFileRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IMoveFileRequest=} [properties] Properties to set + */ + function MoveFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MoveFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.workspace = ""; + + /** + * MoveFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.path = ""; + + /** + * MoveFileRequest newPath. + * @member {string} newPath + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.newPath = ""; + + /** + * Creates a new MoveFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.MoveFileRequest} MoveFileRequest instance + */ + MoveFileRequest.create = function create(properties) { + return new MoveFileRequest(properties); + }; + + /** + * Encodes the specified MoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveFileRequest} message MoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.newPath != null && Object.hasOwnProperty.call(message, "newPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newPath); + return writer; + }; + + /** + * Encodes the specified MoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveFileRequest} message MoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.MoveFileRequest} MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.MoveFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.newPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.MoveFileRequest} MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.newPath != null && message.hasOwnProperty("newPath")) + if (!$util.isString(message.newPath)) + return "newPath: string expected"; + return null; + }; + + /** + * Creates a MoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.MoveFileRequest} MoveFileRequest + */ + MoveFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.MoveFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.MoveFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.newPath != null) + message.newPath = String(object.newPath); + return message; + }; + + /** + * Creates a plain object from a MoveFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.MoveFileRequest} message MoveFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.newPath = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.newPath != null && message.hasOwnProperty("newPath")) + object.newPath = message.newPath; + return object; + }; + + /** + * Converts this MoveFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @instance + * @returns {Object.} JSON object + */ + MoveFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MoveFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.MoveFileRequest"; + }; + + return MoveFileRequest; + })(); + + v1alpha2.MoveFileResponse = (function() { + + /** + * Properties of a MoveFileResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IMoveFileResponse + */ + + /** + * Constructs a new MoveFileResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a MoveFileResponse. + * @implements IMoveFileResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IMoveFileResponse=} [properties] Properties to set + */ + function MoveFileResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MoveFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.MoveFileResponse} MoveFileResponse instance + */ + MoveFileResponse.create = function create(properties) { + return new MoveFileResponse(properties); + }; + + /** + * Encodes the specified MoveFileResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveFileResponse} message MoveFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MoveFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveFileResponse} message MoveFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.MoveFileResponse} MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.MoveFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.MoveFileResponse} MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MoveFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.MoveFileResponse} MoveFileResponse + */ + MoveFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.MoveFileResponse) + return object; + return new $root.google.cloud.dataform.v1alpha2.MoveFileResponse(); + }; + + /** + * Creates a plain object from a MoveFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.MoveFileResponse} message MoveFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveFileResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MoveFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @instance + * @returns {Object.} JSON object + */ + MoveFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MoveFileResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.MoveFileResponse"; + }; + + return MoveFileResponse; + })(); + + v1alpha2.WriteFileRequest = (function() { + + /** + * Properties of a WriteFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IWriteFileRequest + * @property {string|null} [workspace] WriteFileRequest workspace + * @property {string|null} [path] WriteFileRequest path + * @property {Uint8Array|null} [contents] WriteFileRequest contents + */ + + /** + * Constructs a new WriteFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a WriteFileRequest. + * @implements IWriteFileRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IWriteFileRequest=} [properties] Properties to set + */ + function WriteFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WriteFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.workspace = ""; + + /** + * WriteFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.path = ""; + + /** + * WriteFileRequest contents. + * @member {Uint8Array} contents + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.contents = $util.newBuffer([]); + + /** + * Creates a new WriteFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IWriteFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.WriteFileRequest} WriteFileRequest instance + */ + WriteFileRequest.create = function create(properties) { + return new WriteFileRequest(properties); + }; + + /** + * Encodes the specified WriteFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IWriteFileRequest} message WriteFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.contents != null && Object.hasOwnProperty.call(message, "contents")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.contents); + return writer; + }; + + /** + * Encodes the specified WriteFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IWriteFileRequest} message WriteFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.WriteFileRequest} WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.WriteFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.contents = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.WriteFileRequest} WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.contents != null && message.hasOwnProperty("contents")) + if (!(message.contents && typeof message.contents.length === "number" || $util.isString(message.contents))) + return "contents: buffer expected"; + return null; + }; + + /** + * Creates a WriteFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.WriteFileRequest} WriteFileRequest + */ + WriteFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.WriteFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.WriteFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.contents != null) + if (typeof object.contents === "string") + $util.base64.decode(object.contents, message.contents = $util.newBuffer($util.base64.length(object.contents)), 0); + else if (object.contents.length >= 0) + message.contents = object.contents; + return message; + }; + + /** + * Creates a plain object from a WriteFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.WriteFileRequest} message WriteFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + if (options.bytes === String) + object.contents = ""; + else { + object.contents = []; + if (options.bytes !== Array) + object.contents = $util.newBuffer(object.contents); + } + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.contents != null && message.hasOwnProperty("contents")) + object.contents = options.bytes === String ? $util.base64.encode(message.contents, 0, message.contents.length) : options.bytes === Array ? Array.prototype.slice.call(message.contents) : message.contents; + return object; + }; + + /** + * Converts this WriteFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @instance + * @returns {Object.} JSON object + */ + WriteFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WriteFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.WriteFileRequest"; + }; + + return WriteFileRequest; + })(); + + v1alpha2.WriteFileResponse = (function() { + + /** + * Properties of a WriteFileResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IWriteFileResponse + */ + + /** + * Constructs a new WriteFileResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a WriteFileResponse. + * @implements IWriteFileResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IWriteFileResponse=} [properties] Properties to set + */ + function WriteFileResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new WriteFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IWriteFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.WriteFileResponse} WriteFileResponse instance + */ + WriteFileResponse.create = function create(properties) { + return new WriteFileResponse(properties); + }; + + /** + * Encodes the specified WriteFileResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IWriteFileResponse} message WriteFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified WriteFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IWriteFileResponse} message WriteFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.WriteFileResponse} WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.WriteFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.WriteFileResponse} WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a WriteFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.WriteFileResponse} WriteFileResponse + */ + WriteFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.WriteFileResponse) + return object; + return new $root.google.cloud.dataform.v1alpha2.WriteFileResponse(); + }; + + /** + * Creates a plain object from a WriteFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.WriteFileResponse} message WriteFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteFileResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this WriteFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @instance + * @returns {Object.} JSON object + */ + WriteFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WriteFileResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.WriteFileResponse"; + }; + + return WriteFileResponse; + })(); + + v1alpha2.InstallNpmPackagesRequest = (function() { + + /** + * Properties of an InstallNpmPackagesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IInstallNpmPackagesRequest + * @property {string|null} [workspace] InstallNpmPackagesRequest workspace + */ + + /** + * Constructs a new InstallNpmPackagesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents an InstallNpmPackagesRequest. + * @implements IInstallNpmPackagesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest=} [properties] Properties to set + */ + function InstallNpmPackagesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstallNpmPackagesRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @instance + */ + InstallNpmPackagesRequest.prototype.workspace = ""; + + /** + * Creates a new InstallNpmPackagesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest} InstallNpmPackagesRequest instance + */ + InstallNpmPackagesRequest.create = function create(properties) { + return new InstallNpmPackagesRequest(properties); + }; + + /** + * Encodes the specified InstallNpmPackagesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest} message InstallNpmPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + return writer; + }; + + /** + * Encodes the specified InstallNpmPackagesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest} message InstallNpmPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest} InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest} InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstallNpmPackagesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstallNpmPackagesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + return null; + }; + + /** + * Creates an InstallNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest} InstallNpmPackagesRequest + */ + InstallNpmPackagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + return message; + }; + + /** + * Creates a plain object from an InstallNpmPackagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest} message InstallNpmPackagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstallNpmPackagesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.workspace = ""; + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + return object; + }; + + /** + * Converts this InstallNpmPackagesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @instance + * @returns {Object.} JSON object + */ + InstallNpmPackagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstallNpmPackagesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstallNpmPackagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest"; + }; + + return InstallNpmPackagesRequest; + })(); + + v1alpha2.InstallNpmPackagesResponse = (function() { + + /** + * Properties of an InstallNpmPackagesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IInstallNpmPackagesResponse + */ + + /** + * Constructs a new InstallNpmPackagesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents an InstallNpmPackagesResponse. + * @implements IInstallNpmPackagesResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse=} [properties] Properties to set + */ + function InstallNpmPackagesResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new InstallNpmPackagesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse} InstallNpmPackagesResponse instance + */ + InstallNpmPackagesResponse.create = function create(properties) { + return new InstallNpmPackagesResponse(properties); + }; + + /** + * Encodes the specified InstallNpmPackagesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse} message InstallNpmPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified InstallNpmPackagesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse} message InstallNpmPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse} InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse} InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstallNpmPackagesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstallNpmPackagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an InstallNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse} InstallNpmPackagesResponse + */ + InstallNpmPackagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse) + return object; + return new $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse(); + }; + + /** + * Creates a plain object from an InstallNpmPackagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse} message InstallNpmPackagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstallNpmPackagesResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this InstallNpmPackagesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @instance + * @returns {Object.} JSON object + */ + InstallNpmPackagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstallNpmPackagesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstallNpmPackagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse"; + }; + + return InstallNpmPackagesResponse; + })(); + + v1alpha2.CompilationResult = (function() { + + /** + * Properties of a CompilationResult. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICompilationResult + * @property {string|null} [name] CompilationResult name + * @property {string|null} [gitCommitish] CompilationResult gitCommitish + * @property {string|null} [workspace] CompilationResult workspace + * @property {google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig|null} [codeCompilationConfig] CompilationResult codeCompilationConfig + * @property {string|null} [dataformCoreVersion] CompilationResult dataformCoreVersion + * @property {Array.|null} [compilationErrors] CompilationResult compilationErrors + */ + + /** + * Constructs a new CompilationResult. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CompilationResult. + * @implements ICompilationResult + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICompilationResult=} [properties] Properties to set + */ + function CompilationResult(properties) { + this.compilationErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationResult name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + CompilationResult.prototype.name = ""; + + /** + * CompilationResult gitCommitish. + * @member {string|null|undefined} gitCommitish + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + CompilationResult.prototype.gitCommitish = null; + + /** + * CompilationResult workspace. + * @member {string|null|undefined} workspace + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + CompilationResult.prototype.workspace = null; + + /** + * CompilationResult codeCompilationConfig. + * @member {google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig|null|undefined} codeCompilationConfig + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + CompilationResult.prototype.codeCompilationConfig = null; + + /** + * CompilationResult dataformCoreVersion. + * @member {string} dataformCoreVersion + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + CompilationResult.prototype.dataformCoreVersion = ""; + + /** + * CompilationResult compilationErrors. + * @member {Array.} compilationErrors + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + CompilationResult.prototype.compilationErrors = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompilationResult source. + * @member {"gitCommitish"|"workspace"|undefined} source + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + Object.defineProperty(CompilationResult.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gitCommitish", "workspace"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompilationResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {google.cloud.dataform.v1alpha2.ICompilationResult=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResult} CompilationResult instance + */ + CompilationResult.create = function create(properties) { + return new CompilationResult(properties); + }; + + /** + * Encodes the specified CompilationResult message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {google.cloud.dataform.v1alpha2.ICompilationResult} message CompilationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.gitCommitish != null && Object.hasOwnProperty.call(message, "gitCommitish")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gitCommitish); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workspace); + if (message.codeCompilationConfig != null && Object.hasOwnProperty.call(message, "codeCompilationConfig")) + $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.encode(message.codeCompilationConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dataformCoreVersion != null && Object.hasOwnProperty.call(message, "dataformCoreVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataformCoreVersion); + if (message.compilationErrors != null && message.compilationErrors.length) + for (var i = 0; i < message.compilationErrors.length; ++i) + $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.encode(message.compilationErrors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationResult message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {google.cloud.dataform.v1alpha2.ICompilationResult} message CompilationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResult} CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.gitCommitish = reader.string(); + break; + } + case 3: { + message.workspace = reader.string(); + break; + } + case 4: { + message.codeCompilationConfig = $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.dataformCoreVersion = reader.string(); + break; + } + case 6: { + if (!(message.compilationErrors && message.compilationErrors.length)) + message.compilationErrors = []; + message.compilationErrors.push($root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResult} CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationResult message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.gitCommitish != null && message.hasOwnProperty("gitCommitish")) { + properties.source = 1; + if (!$util.isString(message.gitCommitish)) + return "gitCommitish: string expected"; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + } + if (message.codeCompilationConfig != null && message.hasOwnProperty("codeCompilationConfig")) { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.verify(message.codeCompilationConfig); + if (error) + return "codeCompilationConfig." + error; + } + if (message.dataformCoreVersion != null && message.hasOwnProperty("dataformCoreVersion")) + if (!$util.isString(message.dataformCoreVersion)) + return "dataformCoreVersion: string expected"; + if (message.compilationErrors != null && message.hasOwnProperty("compilationErrors")) { + if (!Array.isArray(message.compilationErrors)) + return "compilationErrors: array expected"; + for (var i = 0; i < message.compilationErrors.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.verify(message.compilationErrors[i]); + if (error) + return "compilationErrors." + error; + } + } + return null; + }; + + /** + * Creates a CompilationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResult} CompilationResult + */ + CompilationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResult) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResult(); + if (object.name != null) + message.name = String(object.name); + if (object.gitCommitish != null) + message.gitCommitish = String(object.gitCommitish); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.codeCompilationConfig != null) { + if (typeof object.codeCompilationConfig !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResult.codeCompilationConfig: object expected"); + message.codeCompilationConfig = $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.fromObject(object.codeCompilationConfig); + } + if (object.dataformCoreVersion != null) + message.dataformCoreVersion = String(object.dataformCoreVersion); + if (object.compilationErrors) { + if (!Array.isArray(object.compilationErrors)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResult.compilationErrors: array expected"); + message.compilationErrors = []; + for (var i = 0; i < object.compilationErrors.length; ++i) { + if (typeof object.compilationErrors[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResult.compilationErrors: object expected"); + message.compilationErrors[i] = $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.fromObject(object.compilationErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompilationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult} message CompilationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compilationErrors = []; + if (options.defaults) { + object.name = ""; + object.codeCompilationConfig = null; + object.dataformCoreVersion = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gitCommitish != null && message.hasOwnProperty("gitCommitish")) { + object.gitCommitish = message.gitCommitish; + if (options.oneofs) + object.source = "gitCommitish"; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) { + object.workspace = message.workspace; + if (options.oneofs) + object.source = "workspace"; + } + if (message.codeCompilationConfig != null && message.hasOwnProperty("codeCompilationConfig")) + object.codeCompilationConfig = $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.toObject(message.codeCompilationConfig, options); + if (message.dataformCoreVersion != null && message.hasOwnProperty("dataformCoreVersion")) + object.dataformCoreVersion = message.dataformCoreVersion; + if (message.compilationErrors && message.compilationErrors.length) { + object.compilationErrors = []; + for (var j = 0; j < message.compilationErrors.length; ++j) + object.compilationErrors[j] = $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.toObject(message.compilationErrors[j], options); + } + return object; + }; + + /** + * Converts this CompilationResult to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + * @returns {Object.} JSON object + */ + CompilationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompilationResult + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompilationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResult"; + }; + + CompilationResult.CodeCompilationConfig = (function() { + + /** + * Properties of a CodeCompilationConfig. + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @interface ICodeCompilationConfig + * @property {string|null} [defaultDatabase] CodeCompilationConfig defaultDatabase + * @property {string|null} [defaultSchema] CodeCompilationConfig defaultSchema + * @property {string|null} [defaultLocation] CodeCompilationConfig defaultLocation + * @property {string|null} [assertionSchema] CodeCompilationConfig assertionSchema + * @property {Object.|null} [vars] CodeCompilationConfig vars + * @property {string|null} [databaseSuffix] CodeCompilationConfig databaseSuffix + * @property {string|null} [schemaSuffix] CodeCompilationConfig schemaSuffix + * @property {string|null} [tablePrefix] CodeCompilationConfig tablePrefix + */ + + /** + * Constructs a new CodeCompilationConfig. + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @classdesc Represents a CodeCompilationConfig. + * @implements ICodeCompilationConfig + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig=} [properties] Properties to set + */ + function CodeCompilationConfig(properties) { + this.vars = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CodeCompilationConfig defaultDatabase. + * @member {string} defaultDatabase + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultDatabase = ""; + + /** + * CodeCompilationConfig defaultSchema. + * @member {string} defaultSchema + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultSchema = ""; + + /** + * CodeCompilationConfig defaultLocation. + * @member {string} defaultLocation + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultLocation = ""; + + /** + * CodeCompilationConfig assertionSchema. + * @member {string} assertionSchema + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.assertionSchema = ""; + + /** + * CodeCompilationConfig vars. + * @member {Object.} vars + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.vars = $util.emptyObject; + + /** + * CodeCompilationConfig databaseSuffix. + * @member {string} databaseSuffix + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.databaseSuffix = ""; + + /** + * CodeCompilationConfig schemaSuffix. + * @member {string} schemaSuffix + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.schemaSuffix = ""; + + /** + * CodeCompilationConfig tablePrefix. + * @member {string} tablePrefix + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.tablePrefix = ""; + + /** + * Creates a new CodeCompilationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig} CodeCompilationConfig instance + */ + CodeCompilationConfig.create = function create(properties) { + return new CodeCompilationConfig(properties); + }; + + /** + * Encodes the specified CodeCompilationConfig message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig} message CodeCompilationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CodeCompilationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaultDatabase != null && Object.hasOwnProperty.call(message, "defaultDatabase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultDatabase); + if (message.defaultSchema != null && Object.hasOwnProperty.call(message, "defaultSchema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultSchema); + if (message.assertionSchema != null && Object.hasOwnProperty.call(message, "assertionSchema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.assertionSchema); + if (message.vars != null && Object.hasOwnProperty.call(message, "vars")) + for (var keys = Object.keys(message.vars), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.vars[keys[i]]).ldelim(); + if (message.databaseSuffix != null && Object.hasOwnProperty.call(message, "databaseSuffix")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.databaseSuffix); + if (message.schemaSuffix != null && Object.hasOwnProperty.call(message, "schemaSuffix")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.schemaSuffix); + if (message.tablePrefix != null && Object.hasOwnProperty.call(message, "tablePrefix")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.tablePrefix); + if (message.defaultLocation != null && Object.hasOwnProperty.call(message, "defaultLocation")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.defaultLocation); + return writer; + }; + + /** + * Encodes the specified CodeCompilationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig} message CodeCompilationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CodeCompilationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CodeCompilationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.defaultDatabase = reader.string(); + break; + } + case 2: { + message.defaultSchema = reader.string(); + break; + } + case 8: { + message.defaultLocation = reader.string(); + break; + } + case 3: { + message.assertionSchema = reader.string(); + break; + } + case 4: { + if (message.vars === $util.emptyObject) + message.vars = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.vars[key] = value; + break; + } + case 5: { + message.databaseSuffix = reader.string(); + break; + } + case 6: { + message.schemaSuffix = reader.string(); + break; + } + case 7: { + message.tablePrefix = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CodeCompilationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CodeCompilationConfig message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CodeCompilationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + if (!$util.isString(message.defaultDatabase)) + return "defaultDatabase: string expected"; + if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema")) + if (!$util.isString(message.defaultSchema)) + return "defaultSchema: string expected"; + if (message.defaultLocation != null && message.hasOwnProperty("defaultLocation")) + if (!$util.isString(message.defaultLocation)) + return "defaultLocation: string expected"; + if (message.assertionSchema != null && message.hasOwnProperty("assertionSchema")) + if (!$util.isString(message.assertionSchema)) + return "assertionSchema: string expected"; + if (message.vars != null && message.hasOwnProperty("vars")) { + if (!$util.isObject(message.vars)) + return "vars: object expected"; + var key = Object.keys(message.vars); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.vars[key[i]])) + return "vars: string{k:string} expected"; + } + if (message.databaseSuffix != null && message.hasOwnProperty("databaseSuffix")) + if (!$util.isString(message.databaseSuffix)) + return "databaseSuffix: string expected"; + if (message.schemaSuffix != null && message.hasOwnProperty("schemaSuffix")) + if (!$util.isString(message.schemaSuffix)) + return "schemaSuffix: string expected"; + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + if (!$util.isString(message.tablePrefix)) + return "tablePrefix: string expected"; + return null; + }; + + /** + * Creates a CodeCompilationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + */ + CodeCompilationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig(); + if (object.defaultDatabase != null) + message.defaultDatabase = String(object.defaultDatabase); + if (object.defaultSchema != null) + message.defaultSchema = String(object.defaultSchema); + if (object.defaultLocation != null) + message.defaultLocation = String(object.defaultLocation); + if (object.assertionSchema != null) + message.assertionSchema = String(object.assertionSchema); + if (object.vars) { + if (typeof object.vars !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.vars: object expected"); + message.vars = {}; + for (var keys = Object.keys(object.vars), i = 0; i < keys.length; ++i) + message.vars[keys[i]] = String(object.vars[keys[i]]); + } + if (object.databaseSuffix != null) + message.databaseSuffix = String(object.databaseSuffix); + if (object.schemaSuffix != null) + message.schemaSuffix = String(object.schemaSuffix); + if (object.tablePrefix != null) + message.tablePrefix = String(object.tablePrefix); + return message; + }; + + /** + * Creates a plain object from a CodeCompilationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig} message CodeCompilationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CodeCompilationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.vars = {}; + if (options.defaults) { + object.defaultDatabase = ""; + object.defaultSchema = ""; + object.assertionSchema = ""; + object.databaseSuffix = ""; + object.schemaSuffix = ""; + object.tablePrefix = ""; + object.defaultLocation = ""; + } + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + object.defaultDatabase = message.defaultDatabase; + if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema")) + object.defaultSchema = message.defaultSchema; + if (message.assertionSchema != null && message.hasOwnProperty("assertionSchema")) + object.assertionSchema = message.assertionSchema; + var keys2; + if (message.vars && (keys2 = Object.keys(message.vars)).length) { + object.vars = {}; + for (var j = 0; j < keys2.length; ++j) + object.vars[keys2[j]] = message.vars[keys2[j]]; + } + if (message.databaseSuffix != null && message.hasOwnProperty("databaseSuffix")) + object.databaseSuffix = message.databaseSuffix; + if (message.schemaSuffix != null && message.hasOwnProperty("schemaSuffix")) + object.schemaSuffix = message.schemaSuffix; + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + object.tablePrefix = message.tablePrefix; + if (message.defaultLocation != null && message.hasOwnProperty("defaultLocation")) + object.defaultLocation = message.defaultLocation; + return object; + }; + + /** + * Converts this CodeCompilationConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + * @returns {Object.} JSON object + */ + CodeCompilationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CodeCompilationConfig + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CodeCompilationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig"; + }; + + return CodeCompilationConfig; + })(); + + CompilationResult.CompilationError = (function() { + + /** + * Properties of a CompilationError. + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @interface ICompilationError + * @property {string|null} [message] CompilationError message + * @property {string|null} [stack] CompilationError stack + * @property {string|null} [path] CompilationError path + * @property {google.cloud.dataform.v1alpha2.ITarget|null} [actionTarget] CompilationError actionTarget + */ + + /** + * Constructs a new CompilationError. + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @classdesc Represents a CompilationError. + * @implements ICompilationError + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError=} [properties] Properties to set + */ + function CompilationError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationError message. + * @member {string} message + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.message = ""; + + /** + * CompilationError stack. + * @member {string} stack + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.stack = ""; + + /** + * CompilationError path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.path = ""; + + /** + * CompilationError actionTarget. + * @member {google.cloud.dataform.v1alpha2.ITarget|null|undefined} actionTarget + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.actionTarget = null; + + /** + * Creates a new CompilationError instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CompilationError} CompilationError instance + */ + CompilationError.create = function create(properties) { + return new CompilationError(properties); + }; + + /** + * Encodes the specified CompilationError message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError} message CompilationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.stack != null && Object.hasOwnProperty.call(message, "stack")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stack); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); + if (message.actionTarget != null && Object.hasOwnProperty.call(message, "actionTarget")) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.actionTarget, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationError message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError} message CompilationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationError message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CompilationError} CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.stack = reader.string(); + break; + } + case 3: { + message.path = reader.string(); + break; + } + case 4: { + message.actionTarget = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CompilationError} CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationError message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.stack != null && message.hasOwnProperty("stack")) + if (!$util.isString(message.stack)) + return "stack: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.actionTarget != null && message.hasOwnProperty("actionTarget")) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.actionTarget); + if (error) + return "actionTarget." + error; + } + return null; + }; + + /** + * Creates a CompilationError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CompilationError} CompilationError + */ + CompilationError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError(); + if (object.message != null) + message.message = String(object.message); + if (object.stack != null) + message.stack = String(object.stack); + if (object.path != null) + message.path = String(object.path); + if (object.actionTarget != null) { + if (typeof object.actionTarget !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.actionTarget: object expected"); + message.actionTarget = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.actionTarget); + } + return message; + }; + + /** + * Creates a plain object from a CompilationError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.CompilationError} message CompilationError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.stack = ""; + object.path = ""; + object.actionTarget = null; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.stack != null && message.hasOwnProperty("stack")) + object.stack = message.stack; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.actionTarget != null && message.hasOwnProperty("actionTarget")) + object.actionTarget = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.actionTarget, options); + return object; + }; + + /** + * Converts this CompilationError to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @instance + * @returns {Object.} JSON object + */ + CompilationError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompilationError + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompilationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResult.CompilationError"; + }; + + return CompilationError; + })(); + + return CompilationResult; + })(); + + v1alpha2.ListCompilationResultsRequest = (function() { + + /** + * Properties of a ListCompilationResultsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListCompilationResultsRequest + * @property {string|null} [parent] ListCompilationResultsRequest parent + * @property {number|null} [pageSize] ListCompilationResultsRequest pageSize + * @property {string|null} [pageToken] ListCompilationResultsRequest pageToken + */ + + /** + * Constructs a new ListCompilationResultsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListCompilationResultsRequest. + * @implements IListCompilationResultsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsRequest=} [properties] Properties to set + */ + function ListCompilationResultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCompilationResultsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.parent = ""; + + /** + * ListCompilationResultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.pageSize = 0; + + /** + * ListCompilationResultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListCompilationResultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsRequest} ListCompilationResultsRequest instance + */ + ListCompilationResultsRequest.create = function create(properties) { + return new ListCompilationResultsRequest(properties); + }; + + /** + * Encodes the specified ListCompilationResultsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsRequest} message ListCompilationResultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListCompilationResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsRequest} message ListCompilationResultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsRequest} ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsRequest} ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCompilationResultsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCompilationResultsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListCompilationResultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsRequest} ListCompilationResultsRequest + */ + ListCompilationResultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListCompilationResultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ListCompilationResultsRequest} message ListCompilationResultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCompilationResultsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListCompilationResultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCompilationResultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCompilationResultsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCompilationResultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListCompilationResultsRequest"; + }; + + return ListCompilationResultsRequest; + })(); + + v1alpha2.ListCompilationResultsResponse = (function() { + + /** + * Properties of a ListCompilationResultsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListCompilationResultsResponse + * @property {Array.|null} [compilationResults] ListCompilationResultsResponse compilationResults + * @property {string|null} [nextPageToken] ListCompilationResultsResponse nextPageToken + * @property {Array.|null} [unreachable] ListCompilationResultsResponse unreachable + */ + + /** + * Constructs a new ListCompilationResultsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListCompilationResultsResponse. + * @implements IListCompilationResultsResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsResponse=} [properties] Properties to set + */ + function ListCompilationResultsResponse(properties) { + this.compilationResults = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCompilationResultsResponse compilationResults. + * @member {Array.} compilationResults + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.compilationResults = $util.emptyArray; + + /** + * ListCompilationResultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.nextPageToken = ""; + + /** + * ListCompilationResultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCompilationResultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsResponse} ListCompilationResultsResponse instance + */ + ListCompilationResultsResponse.create = function create(properties) { + return new ListCompilationResultsResponse(properties); + }; + + /** + * Encodes the specified ListCompilationResultsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsResponse} message ListCompilationResultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compilationResults != null && message.compilationResults.length) + for (var i = 0; i < message.compilationResults.length; ++i) + $root.google.cloud.dataform.v1alpha2.CompilationResult.encode(message.compilationResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListCompilationResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsResponse} message ListCompilationResultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsResponse} ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListCompilationResultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.compilationResults && message.compilationResults.length)) + message.compilationResults = []; + message.compilationResults.push($root.google.cloud.dataform.v1alpha2.CompilationResult.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsResponse} ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCompilationResultsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCompilationResultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compilationResults != null && message.hasOwnProperty("compilationResults")) { + if (!Array.isArray(message.compilationResults)) + return "compilationResults: array expected"; + for (var i = 0; i < message.compilationResults.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResult.verify(message.compilationResults[i]); + if (error) + return "compilationResults." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListCompilationResultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsResponse} ListCompilationResultsResponse + */ + ListCompilationResultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListCompilationResultsResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListCompilationResultsResponse(); + if (object.compilationResults) { + if (!Array.isArray(object.compilationResults)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.compilationResults: array expected"); + message.compilationResults = []; + for (var i = 0; i < object.compilationResults.length; ++i) { + if (typeof object.compilationResults[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.compilationResults: object expected"); + message.compilationResults[i] = $root.google.cloud.dataform.v1alpha2.CompilationResult.fromObject(object.compilationResults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListCompilationResultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.ListCompilationResultsResponse} message ListCompilationResultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCompilationResultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.compilationResults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.compilationResults && message.compilationResults.length) { + object.compilationResults = []; + for (var j = 0; j < message.compilationResults.length; ++j) + object.compilationResults[j] = $root.google.cloud.dataform.v1alpha2.CompilationResult.toObject(message.compilationResults[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListCompilationResultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCompilationResultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCompilationResultsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCompilationResultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListCompilationResultsResponse"; + }; + + return ListCompilationResultsResponse; + })(); + + v1alpha2.GetCompilationResultRequest = (function() { + + /** + * Properties of a GetCompilationResultRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IGetCompilationResultRequest + * @property {string|null} [name] GetCompilationResultRequest name + */ + + /** + * Constructs a new GetCompilationResultRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a GetCompilationResultRequest. + * @implements IGetCompilationResultRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IGetCompilationResultRequest=} [properties] Properties to set + */ + function GetCompilationResultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCompilationResultRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @instance + */ + GetCompilationResultRequest.prototype.name = ""; + + /** + * Creates a new GetCompilationResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetCompilationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.GetCompilationResultRequest} GetCompilationResultRequest instance + */ + GetCompilationResultRequest.create = function create(properties) { + return new GetCompilationResultRequest(properties); + }; + + /** + * Encodes the specified GetCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetCompilationResultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetCompilationResultRequest} message GetCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCompilationResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetCompilationResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetCompilationResultRequest} message GetCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCompilationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.GetCompilationResultRequest} GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCompilationResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.GetCompilationResultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.GetCompilationResultRequest} GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCompilationResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCompilationResultRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCompilationResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.GetCompilationResultRequest} GetCompilationResultRequest + */ + GetCompilationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.GetCompilationResultRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.GetCompilationResultRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCompilationResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.GetCompilationResultRequest} message GetCompilationResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCompilationResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetCompilationResultRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @instance + * @returns {Object.} JSON object + */ + GetCompilationResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetCompilationResultRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCompilationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.GetCompilationResultRequest"; + }; + + return GetCompilationResultRequest; + })(); + + v1alpha2.CreateCompilationResultRequest = (function() { + + /** + * Properties of a CreateCompilationResultRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICreateCompilationResultRequest + * @property {string|null} [parent] CreateCompilationResultRequest parent + * @property {google.cloud.dataform.v1alpha2.ICompilationResult|null} [compilationResult] CreateCompilationResultRequest compilationResult + */ + + /** + * Constructs a new CreateCompilationResultRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CreateCompilationResultRequest. + * @implements ICreateCompilationResultRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest=} [properties] Properties to set + */ + function CreateCompilationResultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCompilationResultRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @instance + */ + CreateCompilationResultRequest.prototype.parent = ""; + + /** + * CreateCompilationResultRequest compilationResult. + * @member {google.cloud.dataform.v1alpha2.ICompilationResult|null|undefined} compilationResult + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @instance + */ + CreateCompilationResultRequest.prototype.compilationResult = null; + + /** + * Creates a new CreateCompilationResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CreateCompilationResultRequest} CreateCompilationResultRequest instance + */ + CreateCompilationResultRequest.create = function create(properties) { + return new CreateCompilationResultRequest(properties); + }; + + /** + * Encodes the specified CreateCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateCompilationResultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest} message CreateCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCompilationResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.compilationResult != null && Object.hasOwnProperty.call(message, "compilationResult")) + $root.google.cloud.dataform.v1alpha2.CompilationResult.encode(message.compilationResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateCompilationResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest} message CreateCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCompilationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CreateCompilationResultRequest} CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCompilationResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.compilationResult = $root.google.cloud.dataform.v1alpha2.CompilationResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CreateCompilationResultRequest} CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCompilationResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCompilationResultRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCompilationResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResult.verify(message.compilationResult); + if (error) + return "compilationResult." + error; + } + return null; + }; + + /** + * Creates a CreateCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CreateCompilationResultRequest} CreateCompilationResultRequest + */ + CreateCompilationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.compilationResult != null) { + if (typeof object.compilationResult !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CreateCompilationResultRequest.compilationResult: object expected"); + message.compilationResult = $root.google.cloud.dataform.v1alpha2.CompilationResult.fromObject(object.compilationResult); + } + return message; + }; + + /** + * Creates a plain object from a CreateCompilationResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.CreateCompilationResultRequest} message CreateCompilationResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCompilationResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.compilationResult = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + object.compilationResult = $root.google.cloud.dataform.v1alpha2.CompilationResult.toObject(message.compilationResult, options); + return object; + }; + + /** + * Converts this CreateCompilationResultRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCompilationResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCompilationResultRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCompilationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CreateCompilationResultRequest"; + }; + + return CreateCompilationResultRequest; + })(); + + v1alpha2.Target = (function() { + + /** + * Properties of a Target. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ITarget + * @property {string|null} [database] Target database + * @property {string|null} [schema] Target schema + * @property {string|null} [name] Target name + */ + + /** + * Constructs a new Target. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a Target. + * @implements ITarget + * @constructor + * @param {google.cloud.dataform.v1alpha2.ITarget=} [properties] Properties to set + */ + function Target(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Target database. + * @member {string} database + * @memberof google.cloud.dataform.v1alpha2.Target + * @instance + */ + Target.prototype.database = ""; + + /** + * Target schema. + * @member {string} schema + * @memberof google.cloud.dataform.v1alpha2.Target + * @instance + */ + Target.prototype.schema = ""; + + /** + * Target name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.Target + * @instance + */ + Target.prototype.name = ""; + + /** + * Creates a new Target instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {google.cloud.dataform.v1alpha2.ITarget=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.Target} Target instance + */ + Target.create = function create(properties) { + return new Target(properties); + }; + + /** + * Encodes the specified Target message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Target.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {google.cloud.dataform.v1alpha2.ITarget} message Target message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Target.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schema); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Target.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {google.cloud.dataform.v1alpha2.ITarget} message Target message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Target.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Target message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.Target} Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Target.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.Target(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.database = reader.string(); + break; + } + case 2: { + message.schema = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Target message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.Target} Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Target.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Target message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Target.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Target message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.Target} Target + */ + Target.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.Target) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.Target(); + if (object.database != null) + message.database = String(object.database); + if (object.schema != null) + message.schema = String(object.schema); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {google.cloud.dataform.v1alpha2.Target} message Target + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Target.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.database = ""; + object.schema = ""; + object.name = ""; + } + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Target to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.Target + * @instance + * @returns {Object.} JSON object + */ + Target.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Target + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Target.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.Target"; + }; + + return Target; + })(); + + v1alpha2.RelationDescriptor = (function() { + + /** + * Properties of a RelationDescriptor. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IRelationDescriptor + * @property {string|null} [description] RelationDescriptor description + * @property {Array.|null} [columns] RelationDescriptor columns + * @property {Object.|null} [bigqueryLabels] RelationDescriptor bigqueryLabels + */ + + /** + * Constructs a new RelationDescriptor. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a RelationDescriptor. + * @implements IRelationDescriptor + * @constructor + * @param {google.cloud.dataform.v1alpha2.IRelationDescriptor=} [properties] Properties to set + */ + function RelationDescriptor(properties) { + this.columns = []; + this.bigqueryLabels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RelationDescriptor description. + * @member {string} description + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.description = ""; + + /** + * RelationDescriptor columns. + * @member {Array.} columns + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.columns = $util.emptyArray; + + /** + * RelationDescriptor bigqueryLabels. + * @member {Object.} bigqueryLabels + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.bigqueryLabels = $util.emptyObject; + + /** + * Creates a new RelationDescriptor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.IRelationDescriptor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor} RelationDescriptor instance + */ + RelationDescriptor.create = function create(properties) { + return new RelationDescriptor(properties); + }; + + /** + * Encodes the specified RelationDescriptor message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.IRelationDescriptor} message RelationDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RelationDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bigqueryLabels != null && Object.hasOwnProperty.call(message, "bigqueryLabels")) + for (var keys = Object.keys(message.bigqueryLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.bigqueryLabels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified RelationDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.IRelationDescriptor} message RelationDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RelationDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor} RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RelationDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.RelationDescriptor(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.decode(reader, reader.uint32())); + break; + } + case 3: { + if (message.bigqueryLabels === $util.emptyObject) + message.bigqueryLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.bigqueryLabels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor} RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RelationDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RelationDescriptor message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RelationDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + if (message.bigqueryLabels != null && message.hasOwnProperty("bigqueryLabels")) { + if (!$util.isObject(message.bigqueryLabels)) + return "bigqueryLabels: object expected"; + var key = Object.keys(message.bigqueryLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.bigqueryLabels[key[i]])) + return "bigqueryLabels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a RelationDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor} RelationDescriptor + */ + RelationDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.RelationDescriptor) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.RelationDescriptor(); + if (object.description != null) + message.description = String(object.description); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.cloud.dataform.v1alpha2.RelationDescriptor.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.RelationDescriptor.columns: object expected"); + message.columns[i] = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.fromObject(object.columns[i]); + } + } + if (object.bigqueryLabels) { + if (typeof object.bigqueryLabels !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.RelationDescriptor.bigqueryLabels: object expected"); + message.bigqueryLabels = {}; + for (var keys = Object.keys(object.bigqueryLabels), i = 0; i < keys.length; ++i) + message.bigqueryLabels[keys[i]] = String(object.bigqueryLabels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a RelationDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.RelationDescriptor} message RelationDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RelationDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (options.objects || options.defaults) + object.bigqueryLabels = {}; + if (options.defaults) + object.description = ""; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.toObject(message.columns[j], options); + } + var keys2; + if (message.bigqueryLabels && (keys2 = Object.keys(message.bigqueryLabels)).length) { + object.bigqueryLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.bigqueryLabels[keys2[j]] = message.bigqueryLabels[keys2[j]]; + } + return object; + }; + + /** + * Converts this RelationDescriptor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @instance + * @returns {Object.} JSON object + */ + RelationDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RelationDescriptor + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RelationDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.RelationDescriptor"; + }; + + RelationDescriptor.ColumnDescriptor = (function() { + + /** + * Properties of a ColumnDescriptor. + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @interface IColumnDescriptor + * @property {Array.|null} [path] ColumnDescriptor path + * @property {string|null} [description] ColumnDescriptor description + * @property {Array.|null} [bigqueryPolicyTags] ColumnDescriptor bigqueryPolicyTags + */ + + /** + * Constructs a new ColumnDescriptor. + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @classdesc Represents a ColumnDescriptor. + * @implements IColumnDescriptor + * @constructor + * @param {google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor=} [properties] Properties to set + */ + function ColumnDescriptor(properties) { + this.path = []; + this.bigqueryPolicyTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnDescriptor path. + * @member {Array.} path + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.path = $util.emptyArray; + + /** + * ColumnDescriptor description. + * @member {string} description + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.description = ""; + + /** + * ColumnDescriptor bigqueryPolicyTags. + * @member {Array.} bigqueryPolicyTags + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.bigqueryPolicyTags = $util.emptyArray; + + /** + * Creates a new ColumnDescriptor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor} ColumnDescriptor instance + */ + ColumnDescriptor.create = function create(properties) { + return new ColumnDescriptor(properties); + }; + + /** + * Encodes the specified ColumnDescriptor message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor} message ColumnDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) + for (var i = 0; i < message.path.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path[i]); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.bigqueryPolicyTags != null && message.bigqueryPolicyTags.length) + for (var i = 0; i < message.bigqueryPolicyTags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.bigqueryPolicyTags[i]); + return writer; + }; + + /** + * Encodes the specified ColumnDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor} message ColumnDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.string()); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + if (!(message.bigqueryPolicyTags && message.bigqueryPolicyTags.length)) + message.bigqueryPolicyTags = []; + message.bigqueryPolicyTags.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnDescriptor message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isString(message.path[i])) + return "path: string[] expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.bigqueryPolicyTags != null && message.hasOwnProperty("bigqueryPolicyTags")) { + if (!Array.isArray(message.bigqueryPolicyTags)) + return "bigqueryPolicyTags: array expected"; + for (var i = 0; i < message.bigqueryPolicyTags.length; ++i) + if (!$util.isString(message.bigqueryPolicyTags[i])) + return "bigqueryPolicyTags: string[] expected"; + } + return null; + }; + + /** + * Creates a ColumnDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + */ + ColumnDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = String(object.path[i]); + } + if (object.description != null) + message.description = String(object.description); + if (object.bigqueryPolicyTags) { + if (!Array.isArray(object.bigqueryPolicyTags)) + throw TypeError(".google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.bigqueryPolicyTags: array expected"); + message.bigqueryPolicyTags = []; + for (var i = 0; i < object.bigqueryPolicyTags.length; ++i) + message.bigqueryPolicyTags[i] = String(object.bigqueryPolicyTags[i]); + } + return message; + }; + + /** + * Creates a plain object from a ColumnDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor} message ColumnDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.bigqueryPolicyTags = []; + } + if (options.defaults) + object.description = ""; + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.bigqueryPolicyTags && message.bigqueryPolicyTags.length) { + object.bigqueryPolicyTags = []; + for (var j = 0; j < message.bigqueryPolicyTags.length; ++j) + object.bigqueryPolicyTags[j] = message.bigqueryPolicyTags[j]; + } + return object; + }; + + /** + * Converts this ColumnDescriptor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @instance + * @returns {Object.} JSON object + */ + ColumnDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ColumnDescriptor + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ColumnDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor"; + }; + + return ColumnDescriptor; + })(); + + return RelationDescriptor; + })(); + + v1alpha2.CompilationResultAction = (function() { + + /** + * Properties of a CompilationResultAction. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICompilationResultAction + * @property {google.cloud.dataform.v1alpha2.ITarget|null} [target] CompilationResultAction target + * @property {google.cloud.dataform.v1alpha2.ITarget|null} [canonicalTarget] CompilationResultAction canonicalTarget + * @property {string|null} [filePath] CompilationResultAction filePath + * @property {google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation|null} [relation] CompilationResultAction relation + * @property {google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations|null} [operations] CompilationResultAction operations + * @property {google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion|null} [assertion] CompilationResultAction assertion + * @property {google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration|null} [declaration] CompilationResultAction declaration + */ + + /** + * Constructs a new CompilationResultAction. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CompilationResultAction. + * @implements ICompilationResultAction + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICompilationResultAction=} [properties] Properties to set + */ + function CompilationResultAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationResultAction target. + * @member {google.cloud.dataform.v1alpha2.ITarget|null|undefined} target + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.target = null; + + /** + * CompilationResultAction canonicalTarget. + * @member {google.cloud.dataform.v1alpha2.ITarget|null|undefined} canonicalTarget + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.canonicalTarget = null; + + /** + * CompilationResultAction filePath. + * @member {string} filePath + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.filePath = ""; + + /** + * CompilationResultAction relation. + * @member {google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation|null|undefined} relation + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.relation = null; + + /** + * CompilationResultAction operations. + * @member {google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations|null|undefined} operations + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.operations = null; + + /** + * CompilationResultAction assertion. + * @member {google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion|null|undefined} assertion + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.assertion = null; + + /** + * CompilationResultAction declaration. + * @member {google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration|null|undefined} declaration + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.declaration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompilationResultAction compiledObject. + * @member {"relation"|"operations"|"assertion"|"declaration"|undefined} compiledObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + Object.defineProperty(CompilationResultAction.prototype, "compiledObject", { + get: $util.oneOfGetter($oneOfFields = ["relation", "operations", "assertion", "declaration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompilationResultAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1alpha2.ICompilationResultAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction} CompilationResultAction instance + */ + CompilationResultAction.create = function create(properties) { + return new CompilationResultAction(properties); + }; + + /** + * Encodes the specified CompilationResultAction message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1alpha2.ICompilationResultAction} message CompilationResultAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResultAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget")) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.canonicalTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filePath != null && Object.hasOwnProperty.call(message, "filePath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filePath); + if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) + $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.encode(message.relation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.operations != null && Object.hasOwnProperty.call(message, "operations")) + $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.encode(message.operations, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.assertion != null && Object.hasOwnProperty.call(message, "assertion")) + $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.encode(message.assertion, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.declaration != null && Object.hasOwnProperty.call(message, "declaration")) + $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.encode(message.declaration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationResultAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1alpha2.ICompilationResultAction} message CompilationResultAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResultAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction} CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResultAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.target = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + } + case 2: { + message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + } + case 3: { + message.filePath = reader.string(); + break; + } + case 4: { + message.relation = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.decode(reader, reader.uint32()); + break; + } + case 5: { + message.operations = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.decode(reader, reader.uint32()); + break; + } + case 6: { + message.assertion = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.decode(reader, reader.uint32()); + break; + } + case 7: { + message.declaration = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction} CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResultAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationResultAction message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationResultAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.canonicalTarget); + if (error) + return "canonicalTarget." + error; + } + if (message.filePath != null && message.hasOwnProperty("filePath")) + if (!$util.isString(message.filePath)) + return "filePath: string expected"; + if (message.relation != null && message.hasOwnProperty("relation")) { + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.verify(message.relation); + if (error) + return "relation." + error; + } + } + if (message.operations != null && message.hasOwnProperty("operations")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.verify(message.operations); + if (error) + return "operations." + error; + } + } + if (message.assertion != null && message.hasOwnProperty("assertion")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.verify(message.assertion); + if (error) + return "assertion." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.verify(message.declaration); + if (error) + return "declaration." + error; + } + } + return null; + }; + + /** + * Creates a CompilationResultAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction} CompilationResultAction + */ + CompilationResultAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResultAction) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction(); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.target: object expected"); + message.target = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.target); + } + if (object.canonicalTarget != null) { + if (typeof object.canonicalTarget !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.canonicalTarget: object expected"); + message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.canonicalTarget); + } + if (object.filePath != null) + message.filePath = String(object.filePath); + if (object.relation != null) { + if (typeof object.relation !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.relation: object expected"); + message.relation = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.fromObject(object.relation); + } + if (object.operations != null) { + if (typeof object.operations !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.operations: object expected"); + message.operations = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.fromObject(object.operations); + } + if (object.assertion != null) { + if (typeof object.assertion !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.assertion: object expected"); + message.assertion = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.fromObject(object.assertion); + } + if (object.declaration != null) { + if (typeof object.declaration !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.declaration: object expected"); + message.declaration = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.fromObject(object.declaration); + } + return message; + }; + + /** + * Creates a plain object from a CompilationResultAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction} message CompilationResultAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationResultAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = null; + object.canonicalTarget = null; + object.filePath = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.target, options); + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) + object.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.canonicalTarget, options); + if (message.filePath != null && message.hasOwnProperty("filePath")) + object.filePath = message.filePath; + if (message.relation != null && message.hasOwnProperty("relation")) { + object.relation = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.toObject(message.relation, options); + if (options.oneofs) + object.compiledObject = "relation"; + } + if (message.operations != null && message.hasOwnProperty("operations")) { + object.operations = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.toObject(message.operations, options); + if (options.oneofs) + object.compiledObject = "operations"; + } + if (message.assertion != null && message.hasOwnProperty("assertion")) { + object.assertion = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.toObject(message.assertion, options); + if (options.oneofs) + object.compiledObject = "assertion"; + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + object.declaration = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.toObject(message.declaration, options); + if (options.oneofs) + object.compiledObject = "declaration"; + } + return object; + }; + + /** + * Converts this CompilationResultAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + * @returns {Object.} JSON object + */ + CompilationResultAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompilationResultAction + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompilationResultAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResultAction"; + }; + + CompilationResultAction.Relation = (function() { + + /** + * Properties of a Relation. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @interface IRelation + * @property {Array.|null} [dependencyTargets] Relation dependencyTargets + * @property {boolean|null} [disabled] Relation disabled + * @property {Array.|null} [tags] Relation tags + * @property {google.cloud.dataform.v1alpha2.IRelationDescriptor|null} [relationDescriptor] Relation relationDescriptor + * @property {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType|null} [relationType] Relation relationType + * @property {string|null} [selectQuery] Relation selectQuery + * @property {Array.|null} [preOperations] Relation preOperations + * @property {Array.|null} [postOperations] Relation postOperations + * @property {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig|null} [incrementalTableConfig] Relation incrementalTableConfig + * @property {string|null} [partitionExpression] Relation partitionExpression + * @property {Array.|null} [clusterExpressions] Relation clusterExpressions + * @property {number|null} [partitionExpirationDays] Relation partitionExpirationDays + * @property {boolean|null} [requirePartitionFilter] Relation requirePartitionFilter + * @property {Object.|null} [additionalOptions] Relation additionalOptions + */ + + /** + * Constructs a new Relation. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @classdesc Represents a Relation. + * @implements IRelation + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation=} [properties] Properties to set + */ + function Relation(properties) { + this.dependencyTargets = []; + this.tags = []; + this.preOperations = []; + this.postOperations = []; + this.clusterExpressions = []; + this.additionalOptions = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Relation dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.dependencyTargets = $util.emptyArray; + + /** + * Relation disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.disabled = false; + + /** + * Relation tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.tags = $util.emptyArray; + + /** + * Relation relationDescriptor. + * @member {google.cloud.dataform.v1alpha2.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.relationDescriptor = null; + + /** + * Relation relationType. + * @member {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType} relationType + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.relationType = 0; + + /** + * Relation selectQuery. + * @member {string} selectQuery + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.selectQuery = ""; + + /** + * Relation preOperations. + * @member {Array.} preOperations + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.preOperations = $util.emptyArray; + + /** + * Relation postOperations. + * @member {Array.} postOperations + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.postOperations = $util.emptyArray; + + /** + * Relation incrementalTableConfig. + * @member {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig|null|undefined} incrementalTableConfig + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.incrementalTableConfig = null; + + /** + * Relation partitionExpression. + * @member {string} partitionExpression + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.partitionExpression = ""; + + /** + * Relation clusterExpressions. + * @member {Array.} clusterExpressions + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.clusterExpressions = $util.emptyArray; + + /** + * Relation partitionExpirationDays. + * @member {number} partitionExpirationDays + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.partitionExpirationDays = 0; + + /** + * Relation requirePartitionFilter. + * @member {boolean} requirePartitionFilter + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.requirePartitionFilter = false; + + /** + * Relation additionalOptions. + * @member {Object.} additionalOptions + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.additionalOptions = $util.emptyObject; + + /** + * Creates a new Relation instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation} Relation instance + */ + Relation.create = function create(properties) { + return new Relation(properties); + }; + + /** + * Encodes the specified Relation message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation} message Relation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Relation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1alpha2.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.relationType != null && Object.hasOwnProperty.call(message, "relationType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.relationType); + if (message.selectQuery != null && Object.hasOwnProperty.call(message, "selectQuery")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.selectQuery); + if (message.preOperations != null && message.preOperations.length) + for (var i = 0; i < message.preOperations.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.preOperations[i]); + if (message.postOperations != null && message.postOperations.length) + for (var i = 0; i < message.postOperations.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.postOperations[i]); + if (message.incrementalTableConfig != null && Object.hasOwnProperty.call(message, "incrementalTableConfig")) + $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.encode(message.incrementalTableConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.partitionExpression != null && Object.hasOwnProperty.call(message, "partitionExpression")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.partitionExpression); + if (message.clusterExpressions != null && message.clusterExpressions.length) + for (var i = 0; i < message.clusterExpressions.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.clusterExpressions[i]); + if (message.partitionExpirationDays != null && Object.hasOwnProperty.call(message, "partitionExpirationDays")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.partitionExpirationDays); + if (message.requirePartitionFilter != null && Object.hasOwnProperty.call(message, "requirePartitionFilter")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.requirePartitionFilter); + if (message.additionalOptions != null && Object.hasOwnProperty.call(message, "additionalOptions")) + for (var keys = Object.keys(message.additionalOptions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.additionalOptions[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Relation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation} message Relation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Relation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Relation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation} Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Relation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + message.disabled = reader.bool(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 4: { + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); + break; + } + case 5: { + message.relationType = reader.int32(); + break; + } + case 6: { + message.selectQuery = reader.string(); + break; + } + case 7: { + if (!(message.preOperations && message.preOperations.length)) + message.preOperations = []; + message.preOperations.push(reader.string()); + break; + } + case 8: { + if (!(message.postOperations && message.postOperations.length)) + message.postOperations = []; + message.postOperations.push(reader.string()); + break; + } + case 9: { + message.incrementalTableConfig = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.partitionExpression = reader.string(); + break; + } + case 11: { + if (!(message.clusterExpressions && message.clusterExpressions.length)) + message.clusterExpressions = []; + message.clusterExpressions.push(reader.string()); + break; + } + case 12: { + message.partitionExpirationDays = reader.int32(); + break; + } + case 13: { + message.requirePartitionFilter = reader.bool(); + break; + } + case 14: { + if (message.additionalOptions === $util.emptyObject) + message.additionalOptions = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.additionalOptions[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Relation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation} Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Relation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Relation message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Relation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + if (message.relationType != null && message.hasOwnProperty("relationType")) + switch (message.relationType) { + default: + return "relationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + if (!$util.isString(message.selectQuery)) + return "selectQuery: string expected"; + if (message.preOperations != null && message.hasOwnProperty("preOperations")) { + if (!Array.isArray(message.preOperations)) + return "preOperations: array expected"; + for (var i = 0; i < message.preOperations.length; ++i) + if (!$util.isString(message.preOperations[i])) + return "preOperations: string[] expected"; + } + if (message.postOperations != null && message.hasOwnProperty("postOperations")) { + if (!Array.isArray(message.postOperations)) + return "postOperations: array expected"; + for (var i = 0; i < message.postOperations.length; ++i) + if (!$util.isString(message.postOperations[i])) + return "postOperations: string[] expected"; + } + if (message.incrementalTableConfig != null && message.hasOwnProperty("incrementalTableConfig")) { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.verify(message.incrementalTableConfig); + if (error) + return "incrementalTableConfig." + error; + } + if (message.partitionExpression != null && message.hasOwnProperty("partitionExpression")) + if (!$util.isString(message.partitionExpression)) + return "partitionExpression: string expected"; + if (message.clusterExpressions != null && message.hasOwnProperty("clusterExpressions")) { + if (!Array.isArray(message.clusterExpressions)) + return "clusterExpressions: array expected"; + for (var i = 0; i < message.clusterExpressions.length; ++i) + if (!$util.isString(message.clusterExpressions[i])) + return "clusterExpressions: string[] expected"; + } + if (message.partitionExpirationDays != null && message.hasOwnProperty("partitionExpirationDays")) + if (!$util.isInteger(message.partitionExpirationDays)) + return "partitionExpirationDays: integer expected"; + if (message.requirePartitionFilter != null && message.hasOwnProperty("requirePartitionFilter")) + if (typeof message.requirePartitionFilter !== "boolean") + return "requirePartitionFilter: boolean expected"; + if (message.additionalOptions != null && message.hasOwnProperty("additionalOptions")) { + if (!$util.isObject(message.additionalOptions)) + return "additionalOptions: object expected"; + var key = Object.keys(message.additionalOptions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.additionalOptions[key[i]])) + return "additionalOptions: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Relation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation} Relation + */ + Relation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.fromObject(object.relationDescriptor); + } + switch (object.relationType) { + default: + if (typeof object.relationType === "number") { + message.relationType = object.relationType; + break; + } + break; + case "RELATION_TYPE_UNSPECIFIED": + case 0: + message.relationType = 0; + break; + case "TABLE": + case 1: + message.relationType = 1; + break; + case "VIEW": + case 2: + message.relationType = 2; + break; + case "INCREMENTAL_TABLE": + case 3: + message.relationType = 3; + break; + case "MATERIALIZED_VIEW": + case 4: + message.relationType = 4; + break; + } + if (object.selectQuery != null) + message.selectQuery = String(object.selectQuery); + if (object.preOperations) { + if (!Array.isArray(object.preOperations)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.preOperations: array expected"); + message.preOperations = []; + for (var i = 0; i < object.preOperations.length; ++i) + message.preOperations[i] = String(object.preOperations[i]); + } + if (object.postOperations) { + if (!Array.isArray(object.postOperations)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.postOperations: array expected"); + message.postOperations = []; + for (var i = 0; i < object.postOperations.length; ++i) + message.postOperations[i] = String(object.postOperations[i]); + } + if (object.incrementalTableConfig != null) { + if (typeof object.incrementalTableConfig !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.incrementalTableConfig: object expected"); + message.incrementalTableConfig = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.fromObject(object.incrementalTableConfig); + } + if (object.partitionExpression != null) + message.partitionExpression = String(object.partitionExpression); + if (object.clusterExpressions) { + if (!Array.isArray(object.clusterExpressions)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.clusterExpressions: array expected"); + message.clusterExpressions = []; + for (var i = 0; i < object.clusterExpressions.length; ++i) + message.clusterExpressions[i] = String(object.clusterExpressions[i]); + } + if (object.partitionExpirationDays != null) + message.partitionExpirationDays = object.partitionExpirationDays | 0; + if (object.requirePartitionFilter != null) + message.requirePartitionFilter = Boolean(object.requirePartitionFilter); + if (object.additionalOptions) { + if (typeof object.additionalOptions !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.additionalOptions: object expected"); + message.additionalOptions = {}; + for (var keys = Object.keys(object.additionalOptions), i = 0; i < keys.length; ++i) + message.additionalOptions[keys[i]] = String(object.additionalOptions[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Relation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation} message Relation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Relation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + object.preOperations = []; + object.postOperations = []; + object.clusterExpressions = []; + } + if (options.objects || options.defaults) + object.additionalOptions = {}; + if (options.defaults) { + object.disabled = false; + object.relationDescriptor = null; + object.relationType = options.enums === String ? "RELATION_TYPE_UNSPECIFIED" : 0; + object.selectQuery = ""; + object.incrementalTableConfig = null; + object.partitionExpression = ""; + object.partitionExpirationDays = 0; + object.requirePartitionFilter = false; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.toObject(message.relationDescriptor, options); + if (message.relationType != null && message.hasOwnProperty("relationType")) + object.relationType = options.enums === String ? $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType[message.relationType] === undefined ? message.relationType : $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType[message.relationType] : message.relationType; + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + object.selectQuery = message.selectQuery; + if (message.preOperations && message.preOperations.length) { + object.preOperations = []; + for (var j = 0; j < message.preOperations.length; ++j) + object.preOperations[j] = message.preOperations[j]; + } + if (message.postOperations && message.postOperations.length) { + object.postOperations = []; + for (var j = 0; j < message.postOperations.length; ++j) + object.postOperations[j] = message.postOperations[j]; + } + if (message.incrementalTableConfig != null && message.hasOwnProperty("incrementalTableConfig")) + object.incrementalTableConfig = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.toObject(message.incrementalTableConfig, options); + if (message.partitionExpression != null && message.hasOwnProperty("partitionExpression")) + object.partitionExpression = message.partitionExpression; + if (message.clusterExpressions && message.clusterExpressions.length) { + object.clusterExpressions = []; + for (var j = 0; j < message.clusterExpressions.length; ++j) + object.clusterExpressions[j] = message.clusterExpressions[j]; + } + if (message.partitionExpirationDays != null && message.hasOwnProperty("partitionExpirationDays")) + object.partitionExpirationDays = message.partitionExpirationDays; + if (message.requirePartitionFilter != null && message.hasOwnProperty("requirePartitionFilter")) + object.requirePartitionFilter = message.requirePartitionFilter; + var keys2; + if (message.additionalOptions && (keys2 = Object.keys(message.additionalOptions)).length) { + object.additionalOptions = {}; + for (var j = 0; j < keys2.length; ++j) + object.additionalOptions[keys2[j]] = message.additionalOptions[keys2[j]]; + } + return object; + }; + + /** + * Converts this Relation to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + * @returns {Object.} JSON object + */ + Relation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Relation + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Relation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResultAction.Relation"; + }; + + /** + * RelationType enum. + * @name google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType + * @enum {number} + * @property {number} RELATION_TYPE_UNSPECIFIED=0 RELATION_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} VIEW=2 VIEW value + * @property {number} INCREMENTAL_TABLE=3 INCREMENTAL_TABLE value + * @property {number} MATERIALIZED_VIEW=4 MATERIALIZED_VIEW value + */ + Relation.RelationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "VIEW"] = 2; + values[valuesById[3] = "INCREMENTAL_TABLE"] = 3; + values[valuesById[4] = "MATERIALIZED_VIEW"] = 4; + return values; + })(); + + Relation.IncrementalTableConfig = (function() { + + /** + * Properties of an IncrementalTableConfig. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @interface IIncrementalTableConfig + * @property {string|null} [incrementalSelectQuery] IncrementalTableConfig incrementalSelectQuery + * @property {boolean|null} [refreshDisabled] IncrementalTableConfig refreshDisabled + * @property {Array.|null} [uniqueKeyParts] IncrementalTableConfig uniqueKeyParts + * @property {string|null} [updatePartitionFilter] IncrementalTableConfig updatePartitionFilter + * @property {Array.|null} [incrementalPreOperations] IncrementalTableConfig incrementalPreOperations + * @property {Array.|null} [incrementalPostOperations] IncrementalTableConfig incrementalPostOperations + */ + + /** + * Constructs a new IncrementalTableConfig. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @classdesc Represents an IncrementalTableConfig. + * @implements IIncrementalTableConfig + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig=} [properties] Properties to set + */ + function IncrementalTableConfig(properties) { + this.uniqueKeyParts = []; + this.incrementalPreOperations = []; + this.incrementalPostOperations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IncrementalTableConfig incrementalSelectQuery. + * @member {string} incrementalSelectQuery + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalSelectQuery = ""; + + /** + * IncrementalTableConfig refreshDisabled. + * @member {boolean} refreshDisabled + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.refreshDisabled = false; + + /** + * IncrementalTableConfig uniqueKeyParts. + * @member {Array.} uniqueKeyParts + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.uniqueKeyParts = $util.emptyArray; + + /** + * IncrementalTableConfig updatePartitionFilter. + * @member {string} updatePartitionFilter + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.updatePartitionFilter = ""; + + /** + * IncrementalTableConfig incrementalPreOperations. + * @member {Array.} incrementalPreOperations + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalPreOperations = $util.emptyArray; + + /** + * IncrementalTableConfig incrementalPostOperations. + * @member {Array.} incrementalPostOperations + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalPostOperations = $util.emptyArray; + + /** + * Creates a new IncrementalTableConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig instance + */ + IncrementalTableConfig.create = function create(properties) { + return new IncrementalTableConfig(properties); + }; + + /** + * Encodes the specified IncrementalTableConfig message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig} message IncrementalTableConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalTableConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.incrementalSelectQuery != null && Object.hasOwnProperty.call(message, "incrementalSelectQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.incrementalSelectQuery); + if (message.refreshDisabled != null && Object.hasOwnProperty.call(message, "refreshDisabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.refreshDisabled); + if (message.uniqueKeyParts != null && message.uniqueKeyParts.length) + for (var i = 0; i < message.uniqueKeyParts.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uniqueKeyParts[i]); + if (message.updatePartitionFilter != null && Object.hasOwnProperty.call(message, "updatePartitionFilter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.updatePartitionFilter); + if (message.incrementalPreOperations != null && message.incrementalPreOperations.length) + for (var i = 0; i < message.incrementalPreOperations.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.incrementalPreOperations[i]); + if (message.incrementalPostOperations != null && message.incrementalPostOperations.length) + for (var i = 0; i < message.incrementalPostOperations.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.incrementalPostOperations[i]); + return writer; + }; + + /** + * Encodes the specified IncrementalTableConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig} message IncrementalTableConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalTableConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalTableConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.incrementalSelectQuery = reader.string(); + break; + } + case 2: { + message.refreshDisabled = reader.bool(); + break; + } + case 3: { + if (!(message.uniqueKeyParts && message.uniqueKeyParts.length)) + message.uniqueKeyParts = []; + message.uniqueKeyParts.push(reader.string()); + break; + } + case 4: { + message.updatePartitionFilter = reader.string(); + break; + } + case 5: { + if (!(message.incrementalPreOperations && message.incrementalPreOperations.length)) + message.incrementalPreOperations = []; + message.incrementalPreOperations.push(reader.string()); + break; + } + case 6: { + if (!(message.incrementalPostOperations && message.incrementalPostOperations.length)) + message.incrementalPostOperations = []; + message.incrementalPostOperations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalTableConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IncrementalTableConfig message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IncrementalTableConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.incrementalSelectQuery != null && message.hasOwnProperty("incrementalSelectQuery")) + if (!$util.isString(message.incrementalSelectQuery)) + return "incrementalSelectQuery: string expected"; + if (message.refreshDisabled != null && message.hasOwnProperty("refreshDisabled")) + if (typeof message.refreshDisabled !== "boolean") + return "refreshDisabled: boolean expected"; + if (message.uniqueKeyParts != null && message.hasOwnProperty("uniqueKeyParts")) { + if (!Array.isArray(message.uniqueKeyParts)) + return "uniqueKeyParts: array expected"; + for (var i = 0; i < message.uniqueKeyParts.length; ++i) + if (!$util.isString(message.uniqueKeyParts[i])) + return "uniqueKeyParts: string[] expected"; + } + if (message.updatePartitionFilter != null && message.hasOwnProperty("updatePartitionFilter")) + if (!$util.isString(message.updatePartitionFilter)) + return "updatePartitionFilter: string expected"; + if (message.incrementalPreOperations != null && message.hasOwnProperty("incrementalPreOperations")) { + if (!Array.isArray(message.incrementalPreOperations)) + return "incrementalPreOperations: array expected"; + for (var i = 0; i < message.incrementalPreOperations.length; ++i) + if (!$util.isString(message.incrementalPreOperations[i])) + return "incrementalPreOperations: string[] expected"; + } + if (message.incrementalPostOperations != null && message.hasOwnProperty("incrementalPostOperations")) { + if (!Array.isArray(message.incrementalPostOperations)) + return "incrementalPostOperations: array expected"; + for (var i = 0; i < message.incrementalPostOperations.length; ++i) + if (!$util.isString(message.incrementalPostOperations[i])) + return "incrementalPostOperations: string[] expected"; + } + return null; + }; + + /** + * Creates an IncrementalTableConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + */ + IncrementalTableConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig(); + if (object.incrementalSelectQuery != null) + message.incrementalSelectQuery = String(object.incrementalSelectQuery); + if (object.refreshDisabled != null) + message.refreshDisabled = Boolean(object.refreshDisabled); + if (object.uniqueKeyParts) { + if (!Array.isArray(object.uniqueKeyParts)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.uniqueKeyParts: array expected"); + message.uniqueKeyParts = []; + for (var i = 0; i < object.uniqueKeyParts.length; ++i) + message.uniqueKeyParts[i] = String(object.uniqueKeyParts[i]); + } + if (object.updatePartitionFilter != null) + message.updatePartitionFilter = String(object.updatePartitionFilter); + if (object.incrementalPreOperations) { + if (!Array.isArray(object.incrementalPreOperations)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.incrementalPreOperations: array expected"); + message.incrementalPreOperations = []; + for (var i = 0; i < object.incrementalPreOperations.length; ++i) + message.incrementalPreOperations[i] = String(object.incrementalPreOperations[i]); + } + if (object.incrementalPostOperations) { + if (!Array.isArray(object.incrementalPostOperations)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.incrementalPostOperations: array expected"); + message.incrementalPostOperations = []; + for (var i = 0; i < object.incrementalPostOperations.length; ++i) + message.incrementalPostOperations[i] = String(object.incrementalPostOperations[i]); + } + return message; + }; + + /** + * Creates a plain object from an IncrementalTableConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig} message IncrementalTableConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IncrementalTableConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uniqueKeyParts = []; + object.incrementalPreOperations = []; + object.incrementalPostOperations = []; + } + if (options.defaults) { + object.incrementalSelectQuery = ""; + object.refreshDisabled = false; + object.updatePartitionFilter = ""; + } + if (message.incrementalSelectQuery != null && message.hasOwnProperty("incrementalSelectQuery")) + object.incrementalSelectQuery = message.incrementalSelectQuery; + if (message.refreshDisabled != null && message.hasOwnProperty("refreshDisabled")) + object.refreshDisabled = message.refreshDisabled; + if (message.uniqueKeyParts && message.uniqueKeyParts.length) { + object.uniqueKeyParts = []; + for (var j = 0; j < message.uniqueKeyParts.length; ++j) + object.uniqueKeyParts[j] = message.uniqueKeyParts[j]; + } + if (message.updatePartitionFilter != null && message.hasOwnProperty("updatePartitionFilter")) + object.updatePartitionFilter = message.updatePartitionFilter; + if (message.incrementalPreOperations && message.incrementalPreOperations.length) { + object.incrementalPreOperations = []; + for (var j = 0; j < message.incrementalPreOperations.length; ++j) + object.incrementalPreOperations[j] = message.incrementalPreOperations[j]; + } + if (message.incrementalPostOperations && message.incrementalPostOperations.length) { + object.incrementalPostOperations = []; + for (var j = 0; j < message.incrementalPostOperations.length; ++j) + object.incrementalPostOperations[j] = message.incrementalPostOperations[j]; + } + return object; + }; + + /** + * Converts this IncrementalTableConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + * @returns {Object.} JSON object + */ + IncrementalTableConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IncrementalTableConfig + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IncrementalTableConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig"; + }; + + return IncrementalTableConfig; + })(); + + return Relation; + })(); + + CompilationResultAction.Operations = (function() { + + /** + * Properties of an Operations. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @interface IOperations + * @property {Array.|null} [dependencyTargets] Operations dependencyTargets + * @property {boolean|null} [disabled] Operations disabled + * @property {Array.|null} [tags] Operations tags + * @property {google.cloud.dataform.v1alpha2.IRelationDescriptor|null} [relationDescriptor] Operations relationDescriptor + * @property {Array.|null} [queries] Operations queries + * @property {boolean|null} [hasOutput] Operations hasOutput + */ + + /** + * Constructs a new Operations. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @classdesc Represents an Operations. + * @implements IOperations + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations=} [properties] Properties to set + */ + function Operations(properties) { + this.dependencyTargets = []; + this.tags = []; + this.queries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operations dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.dependencyTargets = $util.emptyArray; + + /** + * Operations disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.disabled = false; + + /** + * Operations tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.tags = $util.emptyArray; + + /** + * Operations relationDescriptor. + * @member {google.cloud.dataform.v1alpha2.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.relationDescriptor = null; + + /** + * Operations queries. + * @member {Array.} queries + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.queries = $util.emptyArray; + + /** + * Operations hasOutput. + * @member {boolean} hasOutput + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.hasOutput = false; + + /** + * Creates a new Operations instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Operations} Operations instance + */ + Operations.create = function create(properties) { + return new Operations(properties); + }; + + /** + * Encodes the specified Operations message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations} message Operations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operations.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.queries != null && message.queries.length) + for (var i = 0; i < message.queries.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.queries[i]); + if (message.hasOutput != null && Object.hasOwnProperty.call(message, "hasOutput")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasOutput); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1alpha2.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operations message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations} message Operations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operations.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operations message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Operations} Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operations.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + message.disabled = reader.bool(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 6: { + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.queries && message.queries.length)) + message.queries = []; + message.queries.push(reader.string()); + break; + } + case 5: { + message.hasOutput = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operations message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Operations} Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operations.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operations message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operations.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + if (message.queries != null && message.hasOwnProperty("queries")) { + if (!Array.isArray(message.queries)) + return "queries: array expected"; + for (var i = 0; i < message.queries.length; ++i) + if (!$util.isString(message.queries[i])) + return "queries: string[] expected"; + } + if (message.hasOutput != null && message.hasOwnProperty("hasOutput")) + if (typeof message.hasOutput !== "boolean") + return "hasOutput: boolean expected"; + return null; + }; + + /** + * Creates an Operations message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Operations} Operations + */ + Operations.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.fromObject(object.relationDescriptor); + } + if (object.queries) { + if (!Array.isArray(object.queries)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.queries: array expected"); + message.queries = []; + for (var i = 0; i < object.queries.length; ++i) + message.queries[i] = String(object.queries[i]); + } + if (object.hasOutput != null) + message.hasOutput = Boolean(object.hasOutput); + return message; + }; + + /** + * Creates a plain object from an Operations message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Operations} message Operations + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operations.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + object.queries = []; + } + if (options.defaults) { + object.disabled = false; + object.hasOutput = false; + object.relationDescriptor = null; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.queries && message.queries.length) { + object.queries = []; + for (var j = 0; j < message.queries.length; ++j) + object.queries[j] = message.queries[j]; + } + if (message.hasOutput != null && message.hasOwnProperty("hasOutput")) + object.hasOutput = message.hasOutput; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Operations to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + * @returns {Object.} JSON object + */ + Operations.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operations + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operations.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResultAction.Operations"; + }; + + return Operations; + })(); + + CompilationResultAction.Assertion = (function() { + + /** + * Properties of an Assertion. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @interface IAssertion + * @property {Array.|null} [dependencyTargets] Assertion dependencyTargets + * @property {google.cloud.dataform.v1alpha2.ITarget|null} [parentAction] Assertion parentAction + * @property {boolean|null} [disabled] Assertion disabled + * @property {Array.|null} [tags] Assertion tags + * @property {string|null} [selectQuery] Assertion selectQuery + * @property {google.cloud.dataform.v1alpha2.IRelationDescriptor|null} [relationDescriptor] Assertion relationDescriptor + */ + + /** + * Constructs a new Assertion. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @classdesc Represents an Assertion. + * @implements IAssertion + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion=} [properties] Properties to set + */ + function Assertion(properties) { + this.dependencyTargets = []; + this.tags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Assertion dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.dependencyTargets = $util.emptyArray; + + /** + * Assertion parentAction. + * @member {google.cloud.dataform.v1alpha2.ITarget|null|undefined} parentAction + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.parentAction = null; + + /** + * Assertion disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.disabled = false; + + /** + * Assertion tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.tags = $util.emptyArray; + + /** + * Assertion selectQuery. + * @member {string} selectQuery + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.selectQuery = ""; + + /** + * Assertion relationDescriptor. + * @member {google.cloud.dataform.v1alpha2.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.relationDescriptor = null; + + /** + * Creates a new Assertion instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion} Assertion instance + */ + Assertion.create = function create(properties) { + return new Assertion(properties); + }; + + /** + * Encodes the specified Assertion message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion} message Assertion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Assertion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.selectQuery != null && Object.hasOwnProperty.call(message, "selectQuery")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.selectQuery); + if (message.parentAction != null && Object.hasOwnProperty.call(message, "parentAction")) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.parentAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1alpha2.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Assertion message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion} message Assertion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Assertion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Assertion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion} Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Assertion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); + break; + } + case 5: { + message.parentAction = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + } + case 2: { + message.disabled = reader.bool(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 4: { + message.selectQuery = reader.string(); + break; + } + case 6: { + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Assertion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion} Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Assertion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Assertion message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Assertion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.parentAction != null && message.hasOwnProperty("parentAction")) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.parentAction); + if (error) + return "parentAction." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + if (!$util.isString(message.selectQuery)) + return "selectQuery: string expected"; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + return null; + }; + + /** + * Creates an Assertion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion} Assertion + */ + Assertion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.parentAction != null) { + if (typeof object.parentAction !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.parentAction: object expected"); + message.parentAction = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.parentAction); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.selectQuery != null) + message.selectQuery = String(object.selectQuery); + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.fromObject(object.relationDescriptor); + } + return message; + }; + + /** + * Creates a plain object from an Assertion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion} message Assertion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Assertion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + } + if (options.defaults) { + object.disabled = false; + object.selectQuery = ""; + object.parentAction = null; + object.relationDescriptor = null; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + object.selectQuery = message.selectQuery; + if (message.parentAction != null && message.hasOwnProperty("parentAction")) + object.parentAction = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.parentAction, options); + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Assertion to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + * @returns {Object.} JSON object + */ + Assertion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Assertion + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Assertion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion"; + }; + + return Assertion; + })(); + + CompilationResultAction.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @interface IDeclaration + * @property {google.cloud.dataform.v1alpha2.IRelationDescriptor|null} [relationDescriptor] Declaration relationDescriptor + */ + + /** + * Constructs a new Declaration. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration relationDescriptor. + * @member {google.cloud.dataform.v1alpha2.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @instance + */ + Declaration.prototype.relationDescriptor = null; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1alpha2.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration(); + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.fromObject(object.relationDescriptor); + } + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.relationDescriptor = null; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration"; + }; + + return Declaration; + })(); + + return CompilationResultAction; + })(); + + v1alpha2.QueryCompilationResultActionsRequest = (function() { + + /** + * Properties of a QueryCompilationResultActionsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IQueryCompilationResultActionsRequest + * @property {string|null} [name] QueryCompilationResultActionsRequest name + * @property {number|null} [pageSize] QueryCompilationResultActionsRequest pageSize + * @property {string|null} [pageToken] QueryCompilationResultActionsRequest pageToken + * @property {string|null} [filter] QueryCompilationResultActionsRequest filter + */ + + /** + * Constructs a new QueryCompilationResultActionsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a QueryCompilationResultActionsRequest. + * @implements IQueryCompilationResultActionsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest=} [properties] Properties to set + */ + function QueryCompilationResultActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryCompilationResultActionsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.name = ""; + + /** + * QueryCompilationResultActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.pageSize = 0; + + /** + * QueryCompilationResultActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.pageToken = ""; + + /** + * QueryCompilationResultActionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.filter = ""; + + /** + * Creates a new QueryCompilationResultActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest instance + */ + QueryCompilationResultActionsRequest.create = function create(properties) { + return new QueryCompilationResultActionsRequest(properties); + }; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCompilationResultActionsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCompilationResultActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a QueryCompilationResultActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + */ + QueryCompilationResultActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a QueryCompilationResultActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCompilationResultActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this QueryCompilationResultActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryCompilationResultActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryCompilationResultActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryCompilationResultActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest"; + }; + + return QueryCompilationResultActionsRequest; + })(); + + v1alpha2.QueryCompilationResultActionsResponse = (function() { + + /** + * Properties of a QueryCompilationResultActionsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IQueryCompilationResultActionsResponse + * @property {Array.|null} [compilationResultActions] QueryCompilationResultActionsResponse compilationResultActions + * @property {string|null} [nextPageToken] QueryCompilationResultActionsResponse nextPageToken + */ + + /** + * Constructs a new QueryCompilationResultActionsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a QueryCompilationResultActionsResponse. + * @implements IQueryCompilationResultActionsResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse=} [properties] Properties to set + */ + function QueryCompilationResultActionsResponse(properties) { + this.compilationResultActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryCompilationResultActionsResponse compilationResultActions. + * @member {Array.} compilationResultActions + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @instance + */ + QueryCompilationResultActionsResponse.prototype.compilationResultActions = $util.emptyArray; + + /** + * QueryCompilationResultActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @instance + */ + QueryCompilationResultActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryCompilationResultActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse instance + */ + QueryCompilationResultActionsResponse.create = function create(properties) { + return new QueryCompilationResultActionsResponse(properties); + }; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compilationResultActions != null && message.compilationResultActions.length) + for (var i = 0; i < message.compilationResultActions.length; ++i) + $root.google.cloud.dataform.v1alpha2.CompilationResultAction.encode(message.compilationResultActions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.compilationResultActions && message.compilationResultActions.length)) + message.compilationResultActions = []; + message.compilationResultActions.push($root.google.cloud.dataform.v1alpha2.CompilationResultAction.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCompilationResultActionsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCompilationResultActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compilationResultActions != null && message.hasOwnProperty("compilationResultActions")) { + if (!Array.isArray(message.compilationResultActions)) + return "compilationResultActions: array expected"; + for (var i = 0; i < message.compilationResultActions.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.verify(message.compilationResultActions[i]); + if (error) + return "compilationResultActions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryCompilationResultActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + */ + QueryCompilationResultActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse(); + if (object.compilationResultActions) { + if (!Array.isArray(object.compilationResultActions)) + throw TypeError(".google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.compilationResultActions: array expected"); + message.compilationResultActions = []; + for (var i = 0; i < object.compilationResultActions.length; ++i) { + if (typeof object.compilationResultActions[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.compilationResultActions: object expected"); + message.compilationResultActions[i] = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.fromObject(object.compilationResultActions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryCompilationResultActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCompilationResultActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compilationResultActions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.compilationResultActions && message.compilationResultActions.length) { + object.compilationResultActions = []; + for (var j = 0; j < message.compilationResultActions.length; ++j) + object.compilationResultActions[j] = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.toObject(message.compilationResultActions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryCompilationResultActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryCompilationResultActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryCompilationResultActionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryCompilationResultActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse"; + }; + + return QueryCompilationResultActionsResponse; + })(); + + v1alpha2.WorkflowInvocation = (function() { + + /** + * Properties of a WorkflowInvocation. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IWorkflowInvocation + * @property {string|null} [name] WorkflowInvocation name + * @property {string|null} [compilationResult] WorkflowInvocation compilationResult + * @property {google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig|null} [invocationConfig] WorkflowInvocation invocationConfig + * @property {google.cloud.dataform.v1alpha2.WorkflowInvocation.State|null} [state] WorkflowInvocation state + * @property {google.type.IInterval|null} [invocationTiming] WorkflowInvocation invocationTiming + */ + + /** + * Constructs a new WorkflowInvocation. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a WorkflowInvocation. + * @implements IWorkflowInvocation + * @constructor + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocation=} [properties] Properties to set + */ + function WorkflowInvocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowInvocation name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.name = ""; + + /** + * WorkflowInvocation compilationResult. + * @member {string} compilationResult + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.compilationResult = ""; + + /** + * WorkflowInvocation invocationConfig. + * @member {google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig|null|undefined} invocationConfig + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.invocationConfig = null; + + /** + * WorkflowInvocation state. + * @member {google.cloud.dataform.v1alpha2.WorkflowInvocation.State} state + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.state = 0; + + /** + * WorkflowInvocation invocationTiming. + * @member {google.type.IInterval|null|undefined} invocationTiming + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.invocationTiming = null; + + /** + * Creates a new WorkflowInvocation instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocation=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation} WorkflowInvocation instance + */ + WorkflowInvocation.create = function create(properties) { + return new WorkflowInvocation(properties); + }; + + /** + * Encodes the specified WorkflowInvocation message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocation} message WorkflowInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.compilationResult != null && Object.hasOwnProperty.call(message, "compilationResult")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.compilationResult); + if (message.invocationConfig != null && Object.hasOwnProperty.call(message, "invocationConfig")) + $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.encode(message.invocationConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.invocationTiming != null && Object.hasOwnProperty.call(message, "invocationTiming")) + $root.google.type.Interval.encode(message.invocationTiming, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WorkflowInvocation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocation} message WorkflowInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation} WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.compilationResult = reader.string(); + break; + } + case 3: { + message.invocationConfig = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation} WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowInvocation message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowInvocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + if (!$util.isString(message.compilationResult)) + return "compilationResult: string expected"; + if (message.invocationConfig != null && message.hasOwnProperty("invocationConfig")) { + var error = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.verify(message.invocationConfig); + if (error) + return "invocationConfig." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) { + var error = $root.google.type.Interval.verify(message.invocationTiming); + if (error) + return "invocationTiming." + error; + } + return null; + }; + + /** + * Creates a WorkflowInvocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation} WorkflowInvocation + */ + WorkflowInvocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.WorkflowInvocation) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocation(); + if (object.name != null) + message.name = String(object.name); + if (object.compilationResult != null) + message.compilationResult = String(object.compilationResult); + if (object.invocationConfig != null) { + if (typeof object.invocationConfig !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocation.invocationConfig: object expected"); + message.invocationConfig = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.fromObject(object.invocationConfig); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "CANCELING": + case 5: + message.state = 5; + break; + } + if (object.invocationTiming != null) { + if (typeof object.invocationTiming !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocation.invocationTiming: object expected"); + message.invocationTiming = $root.google.type.Interval.fromObject(object.invocationTiming); + } + return message; + }; + + /** + * Creates a plain object from a WorkflowInvocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation} message WorkflowInvocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowInvocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.compilationResult = ""; + object.invocationConfig = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.invocationTiming = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + object.compilationResult = message.compilationResult; + if (message.invocationConfig != null && message.hasOwnProperty("invocationConfig")) + object.invocationConfig = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.toObject(message.invocationConfig, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.State[message.state] === undefined ? message.state : $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.State[message.state] : message.state; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) + object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); + return object; + }; + + /** + * Converts this WorkflowInvocation to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @instance + * @returns {Object.} JSON object + */ + WorkflowInvocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkflowInvocation + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkflowInvocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.WorkflowInvocation"; + }; + + WorkflowInvocation.InvocationConfig = (function() { + + /** + * Properties of an InvocationConfig. + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @interface IInvocationConfig + * @property {Array.|null} [includedTargets] InvocationConfig includedTargets + * @property {Array.|null} [includedTags] InvocationConfig includedTags + * @property {boolean|null} [transitiveDependenciesIncluded] InvocationConfig transitiveDependenciesIncluded + * @property {boolean|null} [transitiveDependentsIncluded] InvocationConfig transitiveDependentsIncluded + * @property {boolean|null} [fullyRefreshIncrementalTablesEnabled] InvocationConfig fullyRefreshIncrementalTablesEnabled + */ + + /** + * Constructs a new InvocationConfig. + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @classdesc Represents an InvocationConfig. + * @implements IInvocationConfig + * @constructor + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig=} [properties] Properties to set + */ + function InvocationConfig(properties) { + this.includedTargets = []; + this.includedTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InvocationConfig includedTargets. + * @member {Array.} includedTargets + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.includedTargets = $util.emptyArray; + + /** + * InvocationConfig includedTags. + * @member {Array.} includedTags + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.includedTags = $util.emptyArray; + + /** + * InvocationConfig transitiveDependenciesIncluded. + * @member {boolean} transitiveDependenciesIncluded + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.transitiveDependenciesIncluded = false; + + /** + * InvocationConfig transitiveDependentsIncluded. + * @member {boolean} transitiveDependentsIncluded + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.transitiveDependentsIncluded = false; + + /** + * InvocationConfig fullyRefreshIncrementalTablesEnabled. + * @member {boolean} fullyRefreshIncrementalTablesEnabled + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.fullyRefreshIncrementalTablesEnabled = false; + + /** + * Creates a new InvocationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig} InvocationConfig instance + */ + InvocationConfig.create = function create(properties) { + return new InvocationConfig(properties); + }; + + /** + * Encodes the specified InvocationConfig message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig} message InvocationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvocationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includedTargets != null && message.includedTargets.length) + for (var i = 0; i < message.includedTargets.length; ++i) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.includedTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.includedTags != null && message.includedTags.length) + for (var i = 0; i < message.includedTags.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includedTags[i]); + if (message.transitiveDependenciesIncluded != null && Object.hasOwnProperty.call(message, "transitiveDependenciesIncluded")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.transitiveDependenciesIncluded); + if (message.transitiveDependentsIncluded != null && Object.hasOwnProperty.call(message, "transitiveDependentsIncluded")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.transitiveDependentsIncluded); + if (message.fullyRefreshIncrementalTablesEnabled != null && Object.hasOwnProperty.call(message, "fullyRefreshIncrementalTablesEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.fullyRefreshIncrementalTablesEnabled); + return writer; + }; + + /** + * Encodes the specified InvocationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig} message InvocationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvocationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig} InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvocationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.includedTargets && message.includedTargets.length)) + message.includedTargets = []; + message.includedTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.includedTags && message.includedTags.length)) + message.includedTags = []; + message.includedTags.push(reader.string()); + break; + } + case 3: { + message.transitiveDependenciesIncluded = reader.bool(); + break; + } + case 4: { + message.transitiveDependentsIncluded = reader.bool(); + break; + } + case 5: { + message.fullyRefreshIncrementalTablesEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig} InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvocationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvocationConfig message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvocationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.includedTargets != null && message.hasOwnProperty("includedTargets")) { + if (!Array.isArray(message.includedTargets)) + return "includedTargets: array expected"; + for (var i = 0; i < message.includedTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.includedTargets[i]); + if (error) + return "includedTargets." + error; + } + } + if (message.includedTags != null && message.hasOwnProperty("includedTags")) { + if (!Array.isArray(message.includedTags)) + return "includedTags: array expected"; + for (var i = 0; i < message.includedTags.length; ++i) + if (!$util.isString(message.includedTags[i])) + return "includedTags: string[] expected"; + } + if (message.transitiveDependenciesIncluded != null && message.hasOwnProperty("transitiveDependenciesIncluded")) + if (typeof message.transitiveDependenciesIncluded !== "boolean") + return "transitiveDependenciesIncluded: boolean expected"; + if (message.transitiveDependentsIncluded != null && message.hasOwnProperty("transitiveDependentsIncluded")) + if (typeof message.transitiveDependentsIncluded !== "boolean") + return "transitiveDependentsIncluded: boolean expected"; + if (message.fullyRefreshIncrementalTablesEnabled != null && message.hasOwnProperty("fullyRefreshIncrementalTablesEnabled")) + if (typeof message.fullyRefreshIncrementalTablesEnabled !== "boolean") + return "fullyRefreshIncrementalTablesEnabled: boolean expected"; + return null; + }; + + /** + * Creates an InvocationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig} InvocationConfig + */ + InvocationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig(); + if (object.includedTargets) { + if (!Array.isArray(object.includedTargets)) + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.includedTargets: array expected"); + message.includedTargets = []; + for (var i = 0; i < object.includedTargets.length; ++i) { + if (typeof object.includedTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.includedTargets: object expected"); + message.includedTargets[i] = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.includedTargets[i]); + } + } + if (object.includedTags) { + if (!Array.isArray(object.includedTags)) + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.includedTags: array expected"); + message.includedTags = []; + for (var i = 0; i < object.includedTags.length; ++i) + message.includedTags[i] = String(object.includedTags[i]); + } + if (object.transitiveDependenciesIncluded != null) + message.transitiveDependenciesIncluded = Boolean(object.transitiveDependenciesIncluded); + if (object.transitiveDependentsIncluded != null) + message.transitiveDependentsIncluded = Boolean(object.transitiveDependentsIncluded); + if (object.fullyRefreshIncrementalTablesEnabled != null) + message.fullyRefreshIncrementalTablesEnabled = Boolean(object.fullyRefreshIncrementalTablesEnabled); + return message; + }; + + /** + * Creates a plain object from an InvocationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig} message InvocationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvocationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includedTargets = []; + object.includedTags = []; + } + if (options.defaults) { + object.transitiveDependenciesIncluded = false; + object.transitiveDependentsIncluded = false; + object.fullyRefreshIncrementalTablesEnabled = false; + } + if (message.includedTargets && message.includedTargets.length) { + object.includedTargets = []; + for (var j = 0; j < message.includedTargets.length; ++j) + object.includedTargets[j] = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.includedTargets[j], options); + } + if (message.includedTags && message.includedTags.length) { + object.includedTags = []; + for (var j = 0; j < message.includedTags.length; ++j) + object.includedTags[j] = message.includedTags[j]; + } + if (message.transitiveDependenciesIncluded != null && message.hasOwnProperty("transitiveDependenciesIncluded")) + object.transitiveDependenciesIncluded = message.transitiveDependenciesIncluded; + if (message.transitiveDependentsIncluded != null && message.hasOwnProperty("transitiveDependentsIncluded")) + object.transitiveDependentsIncluded = message.transitiveDependentsIncluded; + if (message.fullyRefreshIncrementalTablesEnabled != null && message.hasOwnProperty("fullyRefreshIncrementalTablesEnabled")) + object.fullyRefreshIncrementalTablesEnabled = message.fullyRefreshIncrementalTablesEnabled; + return object; + }; + + /** + * Converts this InvocationConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @instance + * @returns {Object.} JSON object + */ + InvocationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InvocationConfig + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InvocationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig"; + }; + + return InvocationConfig; + })(); + + /** + * State enum. + * @name google.cloud.dataform.v1alpha2.WorkflowInvocation.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} FAILED=4 FAILED value + * @property {number} CANCELING=5 CANCELING value + */ + WorkflowInvocation.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "CANCELING"] = 5; + return values; + })(); + + return WorkflowInvocation; + })(); + + v1alpha2.ListWorkflowInvocationsRequest = (function() { + + /** + * Properties of a ListWorkflowInvocationsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListWorkflowInvocationsRequest + * @property {string|null} [parent] ListWorkflowInvocationsRequest parent + * @property {number|null} [pageSize] ListWorkflowInvocationsRequest pageSize + * @property {string|null} [pageToken] ListWorkflowInvocationsRequest pageToken + */ + + /** + * Constructs a new ListWorkflowInvocationsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListWorkflowInvocationsRequest. + * @implements IListWorkflowInvocationsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest=} [properties] Properties to set + */ + function ListWorkflowInvocationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkflowInvocationsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.parent = ""; + + /** + * ListWorkflowInvocationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.pageSize = 0; + + /** + * ListWorkflowInvocationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListWorkflowInvocationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest instance + */ + ListWorkflowInvocationsRequest.create = function create(properties) { + return new ListWorkflowInvocationsRequest(properties); + }; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkflowInvocationsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkflowInvocationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListWorkflowInvocationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + */ + ListWorkflowInvocationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListWorkflowInvocationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkflowInvocationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListWorkflowInvocationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkflowInvocationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkflowInvocationsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkflowInvocationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest"; + }; + + return ListWorkflowInvocationsRequest; + })(); + + v1alpha2.ListWorkflowInvocationsResponse = (function() { + + /** + * Properties of a ListWorkflowInvocationsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListWorkflowInvocationsResponse + * @property {Array.|null} [workflowInvocations] ListWorkflowInvocationsResponse workflowInvocations + * @property {string|null} [nextPageToken] ListWorkflowInvocationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListWorkflowInvocationsResponse unreachable + */ + + /** + * Constructs a new ListWorkflowInvocationsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListWorkflowInvocationsResponse. + * @implements IListWorkflowInvocationsResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse=} [properties] Properties to set + */ + function ListWorkflowInvocationsResponse(properties) { + this.workflowInvocations = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkflowInvocationsResponse workflowInvocations. + * @member {Array.} workflowInvocations + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.workflowInvocations = $util.emptyArray; + + /** + * ListWorkflowInvocationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.nextPageToken = ""; + + /** + * ListWorkflowInvocationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListWorkflowInvocationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse instance + */ + ListWorkflowInvocationsResponse.create = function create(properties) { + return new ListWorkflowInvocationsResponse(properties); + }; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workflowInvocations != null && message.workflowInvocations.length) + for (var i = 0; i < message.workflowInvocations.length; ++i) + $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.encode(message.workflowInvocations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.workflowInvocations && message.workflowInvocations.length)) + message.workflowInvocations = []; + message.workflowInvocations.push($root.google.cloud.dataform.v1alpha2.WorkflowInvocation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkflowInvocationsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkflowInvocationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workflowInvocations != null && message.hasOwnProperty("workflowInvocations")) { + if (!Array.isArray(message.workflowInvocations)) + return "workflowInvocations: array expected"; + for (var i = 0; i < message.workflowInvocations.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.verify(message.workflowInvocations[i]); + if (error) + return "workflowInvocations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListWorkflowInvocationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + */ + ListWorkflowInvocationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse(); + if (object.workflowInvocations) { + if (!Array.isArray(object.workflowInvocations)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.workflowInvocations: array expected"); + message.workflowInvocations = []; + for (var i = 0; i < object.workflowInvocations.length; ++i) { + if (typeof object.workflowInvocations[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.workflowInvocations: object expected"); + message.workflowInvocations[i] = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.fromObject(object.workflowInvocations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListWorkflowInvocationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkflowInvocationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.workflowInvocations = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.workflowInvocations && message.workflowInvocations.length) { + object.workflowInvocations = []; + for (var j = 0; j < message.workflowInvocations.length; ++j) + object.workflowInvocations[j] = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.toObject(message.workflowInvocations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListWorkflowInvocationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkflowInvocationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkflowInvocationsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkflowInvocationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse"; + }; + + return ListWorkflowInvocationsResponse; + })(); + + v1alpha2.GetWorkflowInvocationRequest = (function() { + + /** + * Properties of a GetWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IGetWorkflowInvocationRequest + * @property {string|null} [name] GetWorkflowInvocationRequest name + */ + + /** + * Constructs a new GetWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a GetWorkflowInvocationRequest. + * @implements IGetWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest=} [properties] Properties to set + */ + function GetWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @instance + */ + GetWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new GetWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest instance + */ + GetWorkflowInvocationRequest.create = function create(properties) { + return new GetWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified GetWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest} message GetWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowInvocationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest} message GetWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkflowInvocationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + */ + GetWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest} message GetWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest"; + }; + + return GetWorkflowInvocationRequest; + })(); + + v1alpha2.CreateWorkflowInvocationRequest = (function() { + + /** + * Properties of a CreateWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICreateWorkflowInvocationRequest + * @property {string|null} [parent] CreateWorkflowInvocationRequest parent + * @property {google.cloud.dataform.v1alpha2.IWorkflowInvocation|null} [workflowInvocation] CreateWorkflowInvocationRequest workflowInvocation + */ + + /** + * Constructs a new CreateWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CreateWorkflowInvocationRequest. + * @implements ICreateWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest=} [properties] Properties to set + */ + function CreateWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateWorkflowInvocationRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @instance + */ + CreateWorkflowInvocationRequest.prototype.parent = ""; + + /** + * CreateWorkflowInvocationRequest workflowInvocation. + * @member {google.cloud.dataform.v1alpha2.IWorkflowInvocation|null|undefined} workflowInvocation + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @instance + */ + CreateWorkflowInvocationRequest.prototype.workflowInvocation = null; + + /** + * Creates a new CreateWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest instance + */ + CreateWorkflowInvocationRequest.create = function create(properties) { + return new CreateWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkflowInvocationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.workflowInvocation != null && Object.hasOwnProperty.call(message, "workflowInvocation")) + $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.encode(message.workflowInvocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.workflowInvocation = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWorkflowInvocationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.workflowInvocation != null && message.hasOwnProperty("workflowInvocation")) { + var error = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.verify(message.workflowInvocation); + if (error) + return "workflowInvocation." + error; + } + return null; + }; + + /** + * Creates a CreateWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + */ + CreateWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.workflowInvocation != null) { + if (typeof object.workflowInvocation !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest.workflowInvocation: object expected"); + message.workflowInvocation = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.fromObject(object.workflowInvocation); + } + return message; + }; + + /** + * Creates a plain object from a CreateWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.workflowInvocation = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.workflowInvocation != null && message.hasOwnProperty("workflowInvocation")) + object.workflowInvocation = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.toObject(message.workflowInvocation, options); + return object; + }; + + /** + * Converts this CreateWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest"; + }; + + return CreateWorkflowInvocationRequest; + })(); + + v1alpha2.DeleteWorkflowInvocationRequest = (function() { + + /** + * Properties of a DeleteWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IDeleteWorkflowInvocationRequest + * @property {string|null} [name] DeleteWorkflowInvocationRequest name + */ + + /** + * Constructs a new DeleteWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a DeleteWorkflowInvocationRequest. + * @implements IDeleteWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest=} [properties] Properties to set + */ + function DeleteWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @instance + */ + DeleteWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new DeleteWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest instance + */ + DeleteWorkflowInvocationRequest.create = function create(properties) { + return new DeleteWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkflowInvocationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteWorkflowInvocationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + */ + DeleteWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest"; + }; + + return DeleteWorkflowInvocationRequest; + })(); + + v1alpha2.CancelWorkflowInvocationRequest = (function() { + + /** + * Properties of a CancelWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICancelWorkflowInvocationRequest + * @property {string|null} [name] CancelWorkflowInvocationRequest name + */ + + /** + * Constructs a new CancelWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CancelWorkflowInvocationRequest. + * @implements ICancelWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest=} [properties] Properties to set + */ + function CancelWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @instance + */ + CancelWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new CancelWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest instance + */ + CancelWorkflowInvocationRequest.create = function create(properties) { + return new CancelWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelWorkflowInvocationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelWorkflowInvocationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + */ + CancelWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest"; + }; + + return CancelWorkflowInvocationRequest; + })(); + + v1alpha2.WorkflowInvocationAction = (function() { + + /** + * Properties of a WorkflowInvocationAction. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IWorkflowInvocationAction + * @property {google.cloud.dataform.v1alpha2.ITarget|null} [target] WorkflowInvocationAction target + * @property {google.cloud.dataform.v1alpha2.ITarget|null} [canonicalTarget] WorkflowInvocationAction canonicalTarget + * @property {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State|null} [state] WorkflowInvocationAction state + * @property {string|null} [failureReason] WorkflowInvocationAction failureReason + * @property {google.type.IInterval|null} [invocationTiming] WorkflowInvocationAction invocationTiming + * @property {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction|null} [bigqueryAction] WorkflowInvocationAction bigqueryAction + */ + + /** + * Constructs a new WorkflowInvocationAction. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a WorkflowInvocationAction. + * @implements IWorkflowInvocationAction + * @constructor + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocationAction=} [properties] Properties to set + */ + function WorkflowInvocationAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowInvocationAction target. + * @member {google.cloud.dataform.v1alpha2.ITarget|null|undefined} target + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.target = null; + + /** + * WorkflowInvocationAction canonicalTarget. + * @member {google.cloud.dataform.v1alpha2.ITarget|null|undefined} canonicalTarget + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.canonicalTarget = null; + + /** + * WorkflowInvocationAction state. + * @member {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State} state + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.state = 0; + + /** + * WorkflowInvocationAction failureReason. + * @member {string} failureReason + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.failureReason = ""; + + /** + * WorkflowInvocationAction invocationTiming. + * @member {google.type.IInterval|null|undefined} invocationTiming + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.invocationTiming = null; + + /** + * WorkflowInvocationAction bigqueryAction. + * @member {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction|null|undefined} bigqueryAction + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.bigqueryAction = null; + + /** + * Creates a new WorkflowInvocationAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocationAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction} WorkflowInvocationAction instance + */ + WorkflowInvocationAction.create = function create(properties) { + return new WorkflowInvocationAction(properties); + }; + + /** + * Encodes the specified WorkflowInvocationAction message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocationAction} message WorkflowInvocationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocationAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget")) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.canonicalTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.invocationTiming != null && Object.hasOwnProperty.call(message, "invocationTiming")) + $root.google.type.Interval.encode(message.invocationTiming, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.bigqueryAction != null && Object.hasOwnProperty.call(message, "bigqueryAction")) + $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.encode(message.bigqueryAction, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.failureReason); + return writer; + }; + + /** + * Encodes the specified WorkflowInvocationAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocationAction} message WorkflowInvocationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocationAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction} WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocationAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.target = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + } + case 2: { + message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 7: { + message.failureReason = reader.string(); + break; + } + case 5: { + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + } + case 6: { + message.bigqueryAction = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction} WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocationAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowInvocationAction message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowInvocationAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.canonicalTarget); + if (error) + return "canonicalTarget." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) { + var error = $root.google.type.Interval.verify(message.invocationTiming); + if (error) + return "invocationTiming." + error; + } + if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) { + var error = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.verify(message.bigqueryAction); + if (error) + return "bigqueryAction." + error; + } + return null; + }; + + /** + * Creates a WorkflowInvocationAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction} WorkflowInvocationAction + */ + WorkflowInvocationAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction(); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocationAction.target: object expected"); + message.target = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.target); + } + if (object.canonicalTarget != null) { + if (typeof object.canonicalTarget !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocationAction.canonicalTarget: object expected"); + message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.canonicalTarget); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "PENDING": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SKIPPED": + case 2: + message.state = 2; + break; + case "DISABLED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "CANCELLED": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + } + if (object.failureReason != null) + message.failureReason = String(object.failureReason); + if (object.invocationTiming != null) { + if (typeof object.invocationTiming !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocationAction.invocationTiming: object expected"); + message.invocationTiming = $root.google.type.Interval.fromObject(object.invocationTiming); + } + if (object.bigqueryAction != null) { + if (typeof object.bigqueryAction !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocationAction.bigqueryAction: object expected"); + message.bigqueryAction = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.fromObject(object.bigqueryAction); + } + return message; + }; + + /** + * Creates a plain object from a WorkflowInvocationAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocationAction} message WorkflowInvocationAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowInvocationAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = null; + object.canonicalTarget = null; + object.state = options.enums === String ? "PENDING" : 0; + object.invocationTiming = null; + object.bigqueryAction = null; + object.failureReason = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.target, options); + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) + object.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.canonicalTarget, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State[message.state] === undefined ? message.state : $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State[message.state] : message.state; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) + object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); + if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) + object.bigqueryAction = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.toObject(message.bigqueryAction, options); + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; + return object; + }; + + /** + * Converts this WorkflowInvocationAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + * @returns {Object.} JSON object + */ + WorkflowInvocationAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkflowInvocationAction + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkflowInvocationAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.WorkflowInvocationAction"; + }; + + /** + * State enum. + * @name google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State + * @enum {number} + * @property {number} PENDING=0 PENDING value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SKIPPED=2 SKIPPED value + * @property {number} DISABLED=3 DISABLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} CANCELLED=5 CANCELLED value + * @property {number} FAILED=6 FAILED value + */ + WorkflowInvocationAction.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PENDING"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SKIPPED"] = 2; + values[valuesById[3] = "DISABLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "CANCELLED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + return values; + })(); + + WorkflowInvocationAction.BigQueryAction = (function() { + + /** + * Properties of a BigQueryAction. + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @interface IBigQueryAction + * @property {string|null} [sqlScript] BigQueryAction sqlScript + */ + + /** + * Constructs a new BigQueryAction. + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @classdesc Represents a BigQueryAction. + * @implements IBigQueryAction + * @constructor + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction=} [properties] Properties to set + */ + function BigQueryAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryAction sqlScript. + * @member {string} sqlScript + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @instance + */ + BigQueryAction.prototype.sqlScript = ""; + + /** + * Creates a new BigQueryAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction} BigQueryAction instance + */ + BigQueryAction.create = function create(properties) { + return new BigQueryAction(properties); + }; + + /** + * Encodes the specified BigQueryAction message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction} message BigQueryAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlScript); + return writer; + }; + + /** + * Encodes the specified BigQueryAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction} message BigQueryAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction} BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sqlScript = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction} BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryAction message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) + if (!$util.isString(message.sqlScript)) + return "sqlScript: string expected"; + return null; + }; + + /** + * Creates a BigQueryAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction} BigQueryAction + */ + BigQueryAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction(); + if (object.sqlScript != null) + message.sqlScript = String(object.sqlScript); + return message; + }; + + /** + * Creates a plain object from a BigQueryAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction} message BigQueryAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sqlScript = ""; + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) + object.sqlScript = message.sqlScript; + return object; + }; + + /** + * Converts this BigQueryAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @instance + * @returns {Object.} JSON object + */ + BigQueryAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryAction + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction"; + }; + + return BigQueryAction; + })(); + + return WorkflowInvocationAction; + })(); + + v1alpha2.QueryWorkflowInvocationActionsRequest = (function() { + + /** + * Properties of a QueryWorkflowInvocationActionsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IQueryWorkflowInvocationActionsRequest + * @property {string|null} [name] QueryWorkflowInvocationActionsRequest name + * @property {number|null} [pageSize] QueryWorkflowInvocationActionsRequest pageSize + * @property {string|null} [pageToken] QueryWorkflowInvocationActionsRequest pageToken + */ + + /** + * Constructs a new QueryWorkflowInvocationActionsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a QueryWorkflowInvocationActionsRequest. + * @implements IQueryWorkflowInvocationActionsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest=} [properties] Properties to set + */ + function QueryWorkflowInvocationActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryWorkflowInvocationActionsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.name = ""; + + /** + * QueryWorkflowInvocationActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.pageSize = 0; + + /** + * QueryWorkflowInvocationActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new QueryWorkflowInvocationActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest instance + */ + QueryWorkflowInvocationActionsRequest.create = function create(properties) { + return new QueryWorkflowInvocationActionsRequest(properties); + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryWorkflowInvocationActionsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryWorkflowInvocationActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a QueryWorkflowInvocationActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + */ + QueryWorkflowInvocationActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryWorkflowInvocationActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this QueryWorkflowInvocationActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryWorkflowInvocationActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryWorkflowInvocationActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryWorkflowInvocationActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest"; + }; + + return QueryWorkflowInvocationActionsRequest; + })(); + + v1alpha2.QueryWorkflowInvocationActionsResponse = (function() { + + /** + * Properties of a QueryWorkflowInvocationActionsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IQueryWorkflowInvocationActionsResponse + * @property {Array.|null} [workflowInvocationActions] QueryWorkflowInvocationActionsResponse workflowInvocationActions + * @property {string|null} [nextPageToken] QueryWorkflowInvocationActionsResponse nextPageToken + */ + + /** + * Constructs a new QueryWorkflowInvocationActionsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a QueryWorkflowInvocationActionsResponse. + * @implements IQueryWorkflowInvocationActionsResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse=} [properties] Properties to set + */ + function QueryWorkflowInvocationActionsResponse(properties) { + this.workflowInvocationActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryWorkflowInvocationActionsResponse workflowInvocationActions. + * @member {Array.} workflowInvocationActions + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @instance + */ + QueryWorkflowInvocationActionsResponse.prototype.workflowInvocationActions = $util.emptyArray; + + /** + * QueryWorkflowInvocationActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @instance + */ + QueryWorkflowInvocationActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryWorkflowInvocationActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse instance + */ + QueryWorkflowInvocationActionsResponse.create = function create(properties) { + return new QueryWorkflowInvocationActionsResponse(properties); + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workflowInvocationActions != null && message.workflowInvocationActions.length) + for (var i = 0; i < message.workflowInvocationActions.length; ++i) + $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.encode(message.workflowInvocationActions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.workflowInvocationActions && message.workflowInvocationActions.length)) + message.workflowInvocationActions = []; + message.workflowInvocationActions.push($root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryWorkflowInvocationActionsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryWorkflowInvocationActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workflowInvocationActions != null && message.hasOwnProperty("workflowInvocationActions")) { + if (!Array.isArray(message.workflowInvocationActions)) + return "workflowInvocationActions: array expected"; + for (var i = 0; i < message.workflowInvocationActions.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.verify(message.workflowInvocationActions[i]); + if (error) + return "workflowInvocationActions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryWorkflowInvocationActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + */ + QueryWorkflowInvocationActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse(); + if (object.workflowInvocationActions) { + if (!Array.isArray(object.workflowInvocationActions)) + throw TypeError(".google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.workflowInvocationActions: array expected"); + message.workflowInvocationActions = []; + for (var i = 0; i < object.workflowInvocationActions.length; ++i) { + if (typeof object.workflowInvocationActions[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.workflowInvocationActions: object expected"); + message.workflowInvocationActions[i] = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.fromObject(object.workflowInvocationActions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryWorkflowInvocationActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.workflowInvocationActions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.workflowInvocationActions && message.workflowInvocationActions.length) { + object.workflowInvocationActions = []; + for (var j = 0; j < message.workflowInvocationActions.length; ++j) + object.workflowInvocationActions[j] = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.toObject(message.workflowInvocationActions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryWorkflowInvocationActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryWorkflowInvocationActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryWorkflowInvocationActionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryWorkflowInvocationActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse"; + }; + + return QueryWorkflowInvocationActionsResponse; + })(); + + return v1alpha2; + })(); + + dataform.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.dataform + * @namespace + */ + var v1beta1 = {}; + + v1beta1.Dataform = (function() { + + /** + * Constructs a new Dataform service. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a Dataform + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Dataform(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Dataform.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Dataform; + + /** + * Creates new Dataform service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataform.v1beta1.Dataform + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Dataform} RPC service. Useful where requests and/or responses are streamed. + */ + Dataform.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listRepositories}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ListRepositoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ListRepositoriesResponse} [response] ListRepositoriesResponse + */ + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ListRepositoriesCallback} callback Node-style callback called with the error, if any, and ListRepositoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listRepositories = function listRepositories(request, callback) { + return this.rpcCall(listRepositories, $root.google.cloud.dataform.v1beta1.ListRepositoriesRequest, $root.google.cloud.dataform.v1beta1.ListRepositoriesResponse, request, callback); + }, "name", { value: "ListRepositories" }); + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getRepository}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef GetRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Repository} [response] Repository + */ + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.GetRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getRepository = function getRepository(request, callback) { + return this.rpcCall(getRepository, $root.google.cloud.dataform.v1beta1.GetRepositoryRequest, $root.google.cloud.dataform.v1beta1.Repository, request, callback); + }, "name", { value: "GetRepository" }); + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createRepository}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CreateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Repository} [response] Repository + */ + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CreateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createRepository = function createRepository(request, callback) { + return this.rpcCall(createRepository, $root.google.cloud.dataform.v1beta1.CreateRepositoryRequest, $root.google.cloud.dataform.v1beta1.Repository, request, callback); + }, "name", { value: "CreateRepository" }); + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|updateRepository}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef UpdateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Repository} [response] Repository + */ + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.UpdateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.updateRepository = function updateRepository(request, callback) { + return this.rpcCall(updateRepository, $root.google.cloud.dataform.v1beta1.UpdateRepositoryRequest, $root.google.cloud.dataform.v1beta1.Repository, request, callback); + }, "name", { value: "UpdateRepository" }); + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|deleteRepository}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef DeleteRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.DeleteRepositoryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteRepository = function deleteRepository(request, callback) { + return this.rpcCall(deleteRepository, $root.google.cloud.dataform.v1beta1.DeleteRepositoryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteRepository" }); + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchRemoteBranches}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef FetchRemoteBranchesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} [response] FetchRemoteBranchesResponse + */ + + /** + * Calls FetchRemoteBranches. + * @function fetchRemoteBranches + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest} request FetchRemoteBranchesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.FetchRemoteBranchesCallback} callback Node-style callback called with the error, if any, and FetchRemoteBranchesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchRemoteBranches = function fetchRemoteBranches(request, callback) { + return this.rpcCall(fetchRemoteBranches, $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest, $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse, request, callback); + }, "name", { value: "FetchRemoteBranches" }); + + /** + * Calls FetchRemoteBranches. + * @function fetchRemoteBranches + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest} request FetchRemoteBranchesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listWorkspaces}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ListWorkspacesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ListWorkspacesResponse} [response] ListWorkspacesResponse + */ + + /** + * Calls ListWorkspaces. + * @function listWorkspaces + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest} request ListWorkspacesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ListWorkspacesCallback} callback Node-style callback called with the error, if any, and ListWorkspacesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listWorkspaces = function listWorkspaces(request, callback) { + return this.rpcCall(listWorkspaces, $root.google.cloud.dataform.v1beta1.ListWorkspacesRequest, $root.google.cloud.dataform.v1beta1.ListWorkspacesResponse, request, callback); + }, "name", { value: "ListWorkspaces" }); + + /** + * Calls ListWorkspaces. + * @function listWorkspaces + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest} request ListWorkspacesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getWorkspace}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef GetWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Workspace} [response] Workspace + */ + + /** + * Calls GetWorkspace. + * @function getWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest} request GetWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.GetWorkspaceCallback} callback Node-style callback called with the error, if any, and Workspace + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getWorkspace = function getWorkspace(request, callback) { + return this.rpcCall(getWorkspace, $root.google.cloud.dataform.v1beta1.GetWorkspaceRequest, $root.google.cloud.dataform.v1beta1.Workspace, request, callback); + }, "name", { value: "GetWorkspace" }); + + /** + * Calls GetWorkspace. + * @function getWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest} request GetWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createWorkspace}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CreateWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Workspace} [response] Workspace + */ + + /** + * Calls CreateWorkspace. + * @function createWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest} request CreateWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CreateWorkspaceCallback} callback Node-style callback called with the error, if any, and Workspace + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createWorkspace = function createWorkspace(request, callback) { + return this.rpcCall(createWorkspace, $root.google.cloud.dataform.v1beta1.CreateWorkspaceRequest, $root.google.cloud.dataform.v1beta1.Workspace, request, callback); + }, "name", { value: "CreateWorkspace" }); + + /** + * Calls CreateWorkspace. + * @function createWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest} request CreateWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|deleteWorkspace}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef DeleteWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteWorkspace. + * @function deleteWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest} request DeleteWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.DeleteWorkspaceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteWorkspace = function deleteWorkspace(request, callback) { + return this.rpcCall(deleteWorkspace, $root.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWorkspace" }); + + /** + * Calls DeleteWorkspace. + * @function deleteWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest} request DeleteWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|installNpmPackages}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef InstallNpmPackagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} [response] InstallNpmPackagesResponse + */ + + /** + * Calls InstallNpmPackages. + * @function installNpmPackages + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest} request InstallNpmPackagesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.InstallNpmPackagesCallback} callback Node-style callback called with the error, if any, and InstallNpmPackagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.installNpmPackages = function installNpmPackages(request, callback) { + return this.rpcCall(installNpmPackages, $root.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest, $root.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse, request, callback); + }, "name", { value: "InstallNpmPackages" }); + + /** + * Calls InstallNpmPackages. + * @function installNpmPackages + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest} request InstallNpmPackagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|pullGitCommits}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef PullGitCommitsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls PullGitCommits. + * @function pullGitCommits + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest} request PullGitCommitsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.PullGitCommitsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.pullGitCommits = function pullGitCommits(request, callback) { + return this.rpcCall(pullGitCommits, $root.google.cloud.dataform.v1beta1.PullGitCommitsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "PullGitCommits" }); + + /** + * Calls PullGitCommits. + * @function pullGitCommits + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest} request PullGitCommitsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|pushGitCommits}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef PushGitCommitsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls PushGitCommits. + * @function pushGitCommits + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest} request PushGitCommitsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.PushGitCommitsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.pushGitCommits = function pushGitCommits(request, callback) { + return this.rpcCall(pushGitCommits, $root.google.cloud.dataform.v1beta1.PushGitCommitsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "PushGitCommits" }); + + /** + * Calls PushGitCommits. + * @function pushGitCommits + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest} request PushGitCommitsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchFileGitStatuses}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef FetchFileGitStatusesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} [response] FetchFileGitStatusesResponse + */ + + /** + * Calls FetchFileGitStatuses. + * @function fetchFileGitStatuses + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest} request FetchFileGitStatusesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.FetchFileGitStatusesCallback} callback Node-style callback called with the error, if any, and FetchFileGitStatusesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchFileGitStatuses = function fetchFileGitStatuses(request, callback) { + return this.rpcCall(fetchFileGitStatuses, $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest, $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse, request, callback); + }, "name", { value: "FetchFileGitStatuses" }); + + /** + * Calls FetchFileGitStatuses. + * @function fetchFileGitStatuses + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest} request FetchFileGitStatusesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchGitAheadBehind}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef FetchGitAheadBehindCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} [response] FetchGitAheadBehindResponse + */ + + /** + * Calls FetchGitAheadBehind. + * @function fetchGitAheadBehind + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest} request FetchGitAheadBehindRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.FetchGitAheadBehindCallback} callback Node-style callback called with the error, if any, and FetchGitAheadBehindResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchGitAheadBehind = function fetchGitAheadBehind(request, callback) { + return this.rpcCall(fetchGitAheadBehind, $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest, $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse, request, callback); + }, "name", { value: "FetchGitAheadBehind" }); + + /** + * Calls FetchGitAheadBehind. + * @function fetchGitAheadBehind + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest} request FetchGitAheadBehindRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|commitWorkspaceChanges}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CommitWorkspaceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CommitWorkspaceChanges. + * @function commitWorkspaceChanges + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest} request CommitWorkspaceChangesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CommitWorkspaceChangesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.commitWorkspaceChanges = function commitWorkspaceChanges(request, callback) { + return this.rpcCall(commitWorkspaceChanges, $root.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CommitWorkspaceChanges" }); + + /** + * Calls CommitWorkspaceChanges. + * @function commitWorkspaceChanges + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest} request CommitWorkspaceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|resetWorkspaceChanges}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ResetWorkspaceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ResetWorkspaceChanges. + * @function resetWorkspaceChanges + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest} request ResetWorkspaceChangesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ResetWorkspaceChangesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.resetWorkspaceChanges = function resetWorkspaceChanges(request, callback) { + return this.rpcCall(resetWorkspaceChanges, $root.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "ResetWorkspaceChanges" }); + + /** + * Calls ResetWorkspaceChanges. + * @function resetWorkspaceChanges + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest} request ResetWorkspaceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchFileDiff}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef FetchFileDiffCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.FetchFileDiffResponse} [response] FetchFileDiffResponse + */ + + /** + * Calls FetchFileDiff. + * @function fetchFileDiff + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest} request FetchFileDiffRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.FetchFileDiffCallback} callback Node-style callback called with the error, if any, and FetchFileDiffResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchFileDiff = function fetchFileDiff(request, callback) { + return this.rpcCall(fetchFileDiff, $root.google.cloud.dataform.v1beta1.FetchFileDiffRequest, $root.google.cloud.dataform.v1beta1.FetchFileDiffResponse, request, callback); + }, "name", { value: "FetchFileDiff" }); + + /** + * Calls FetchFileDiff. + * @function fetchFileDiff + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest} request FetchFileDiffRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|queryDirectoryContents}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef QueryDirectoryContentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} [response] QueryDirectoryContentsResponse + */ + + /** + * Calls QueryDirectoryContents. + * @function queryDirectoryContents + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest} request QueryDirectoryContentsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.QueryDirectoryContentsCallback} callback Node-style callback called with the error, if any, and QueryDirectoryContentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryDirectoryContents = function queryDirectoryContents(request, callback) { + return this.rpcCall(queryDirectoryContents, $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest, $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse, request, callback); + }, "name", { value: "QueryDirectoryContents" }); + + /** + * Calls QueryDirectoryContents. + * @function queryDirectoryContents + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest} request QueryDirectoryContentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|makeDirectory}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef MakeDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.MakeDirectoryResponse} [response] MakeDirectoryResponse + */ + + /** + * Calls MakeDirectory. + * @function makeDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest} request MakeDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.MakeDirectoryCallback} callback Node-style callback called with the error, if any, and MakeDirectoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.makeDirectory = function makeDirectory(request, callback) { + return this.rpcCall(makeDirectory, $root.google.cloud.dataform.v1beta1.MakeDirectoryRequest, $root.google.cloud.dataform.v1beta1.MakeDirectoryResponse, request, callback); + }, "name", { value: "MakeDirectory" }); + + /** + * Calls MakeDirectory. + * @function makeDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest} request MakeDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|removeDirectory}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef RemoveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls RemoveDirectory. + * @function removeDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest} request RemoveDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.RemoveDirectoryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.removeDirectory = function removeDirectory(request, callback) { + return this.rpcCall(removeDirectory, $root.google.cloud.dataform.v1beta1.RemoveDirectoryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "RemoveDirectory" }); + + /** + * Calls RemoveDirectory. + * @function removeDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest} request RemoveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|moveDirectory}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef MoveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.MoveDirectoryResponse} [response] MoveDirectoryResponse + */ + + /** + * Calls MoveDirectory. + * @function moveDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest} request MoveDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.MoveDirectoryCallback} callback Node-style callback called with the error, if any, and MoveDirectoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.moveDirectory = function moveDirectory(request, callback) { + return this.rpcCall(moveDirectory, $root.google.cloud.dataform.v1beta1.MoveDirectoryRequest, $root.google.cloud.dataform.v1beta1.MoveDirectoryResponse, request, callback); + }, "name", { value: "MoveDirectory" }); + + /** + * Calls MoveDirectory. + * @function moveDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest} request MoveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|readFile}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ReadFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ReadFileResponse} [response] ReadFileResponse + */ + + /** + * Calls ReadFile. + * @function readFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IReadFileRequest} request ReadFileRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ReadFileCallback} callback Node-style callback called with the error, if any, and ReadFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.readFile = function readFile(request, callback) { + return this.rpcCall(readFile, $root.google.cloud.dataform.v1beta1.ReadFileRequest, $root.google.cloud.dataform.v1beta1.ReadFileResponse, request, callback); + }, "name", { value: "ReadFile" }); + + /** + * Calls ReadFile. + * @function readFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IReadFileRequest} request ReadFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|removeFile}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef RemoveFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls RemoveFile. + * @function removeFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest} request RemoveFileRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.RemoveFileCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.removeFile = function removeFile(request, callback) { + return this.rpcCall(removeFile, $root.google.cloud.dataform.v1beta1.RemoveFileRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "RemoveFile" }); + + /** + * Calls RemoveFile. + * @function removeFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest} request RemoveFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|moveFile}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef MoveFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.MoveFileResponse} [response] MoveFileResponse + */ + + /** + * Calls MoveFile. + * @function moveFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest} request MoveFileRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.MoveFileCallback} callback Node-style callback called with the error, if any, and MoveFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.moveFile = function moveFile(request, callback) { + return this.rpcCall(moveFile, $root.google.cloud.dataform.v1beta1.MoveFileRequest, $root.google.cloud.dataform.v1beta1.MoveFileResponse, request, callback); + }, "name", { value: "MoveFile" }); + + /** + * Calls MoveFile. + * @function moveFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest} request MoveFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|writeFile}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef WriteFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.WriteFileResponse} [response] WriteFileResponse + */ + + /** + * Calls WriteFile. + * @function writeFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest} request WriteFileRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.WriteFileCallback} callback Node-style callback called with the error, if any, and WriteFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.writeFile = function writeFile(request, callback) { + return this.rpcCall(writeFile, $root.google.cloud.dataform.v1beta1.WriteFileRequest, $root.google.cloud.dataform.v1beta1.WriteFileResponse, request, callback); + }, "name", { value: "WriteFile" }); + + /** + * Calls WriteFile. + * @function writeFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest} request WriteFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listCompilationResults}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ListCompilationResultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} [response] ListCompilationResultsResponse + */ + + /** + * Calls ListCompilationResults. + * @function listCompilationResults + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest} request ListCompilationResultsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ListCompilationResultsCallback} callback Node-style callback called with the error, if any, and ListCompilationResultsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listCompilationResults = function listCompilationResults(request, callback) { + return this.rpcCall(listCompilationResults, $root.google.cloud.dataform.v1beta1.ListCompilationResultsRequest, $root.google.cloud.dataform.v1beta1.ListCompilationResultsResponse, request, callback); + }, "name", { value: "ListCompilationResults" }); + + /** + * Calls ListCompilationResults. + * @function listCompilationResults + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest} request ListCompilationResultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getCompilationResult}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef GetCompilationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.CompilationResult} [response] CompilationResult + */ + + /** + * Calls GetCompilationResult. + * @function getCompilationResult + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest} request GetCompilationResultRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.GetCompilationResultCallback} callback Node-style callback called with the error, if any, and CompilationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getCompilationResult = function getCompilationResult(request, callback) { + return this.rpcCall(getCompilationResult, $root.google.cloud.dataform.v1beta1.GetCompilationResultRequest, $root.google.cloud.dataform.v1beta1.CompilationResult, request, callback); + }, "name", { value: "GetCompilationResult" }); + + /** + * Calls GetCompilationResult. + * @function getCompilationResult + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest} request GetCompilationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createCompilationResult}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CreateCompilationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.CompilationResult} [response] CompilationResult + */ + + /** + * Calls CreateCompilationResult. + * @function createCompilationResult + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest} request CreateCompilationResultRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CreateCompilationResultCallback} callback Node-style callback called with the error, if any, and CompilationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createCompilationResult = function createCompilationResult(request, callback) { + return this.rpcCall(createCompilationResult, $root.google.cloud.dataform.v1beta1.CreateCompilationResultRequest, $root.google.cloud.dataform.v1beta1.CompilationResult, request, callback); + }, "name", { value: "CreateCompilationResult" }); + + /** + * Calls CreateCompilationResult. + * @function createCompilationResult + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest} request CreateCompilationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|queryCompilationResultActions}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef QueryCompilationResultActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} [response] QueryCompilationResultActionsResponse + */ + + /** + * Calls QueryCompilationResultActions. + * @function queryCompilationResultActions + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest} request QueryCompilationResultActionsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.QueryCompilationResultActionsCallback} callback Node-style callback called with the error, if any, and QueryCompilationResultActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryCompilationResultActions = function queryCompilationResultActions(request, callback) { + return this.rpcCall(queryCompilationResultActions, $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest, $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse, request, callback); + }, "name", { value: "QueryCompilationResultActions" }); + + /** + * Calls QueryCompilationResultActions. + * @function queryCompilationResultActions + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest} request QueryCompilationResultActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listWorkflowInvocations}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ListWorkflowInvocationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} [response] ListWorkflowInvocationsResponse + */ + + /** + * Calls ListWorkflowInvocations. + * @function listWorkflowInvocations + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest} request ListWorkflowInvocationsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ListWorkflowInvocationsCallback} callback Node-style callback called with the error, if any, and ListWorkflowInvocationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listWorkflowInvocations = function listWorkflowInvocations(request, callback) { + return this.rpcCall(listWorkflowInvocations, $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest, $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse, request, callback); + }, "name", { value: "ListWorkflowInvocations" }); + + /** + * Calls ListWorkflowInvocations. + * @function listWorkflowInvocations + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest} request ListWorkflowInvocationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getWorkflowInvocation}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef GetWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation} [response] WorkflowInvocation + */ + + /** + * Calls GetWorkflowInvocation. + * @function getWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest} request GetWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.GetWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and WorkflowInvocation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getWorkflowInvocation = function getWorkflowInvocation(request, callback) { + return this.rpcCall(getWorkflowInvocation, $root.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest, $root.google.cloud.dataform.v1beta1.WorkflowInvocation, request, callback); + }, "name", { value: "GetWorkflowInvocation" }); + + /** + * Calls GetWorkflowInvocation. + * @function getWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest} request GetWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createWorkflowInvocation}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CreateWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation} [response] WorkflowInvocation + */ + + /** + * Calls CreateWorkflowInvocation. + * @function createWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest} request CreateWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CreateWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and WorkflowInvocation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createWorkflowInvocation = function createWorkflowInvocation(request, callback) { + return this.rpcCall(createWorkflowInvocation, $root.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest, $root.google.cloud.dataform.v1beta1.WorkflowInvocation, request, callback); + }, "name", { value: "CreateWorkflowInvocation" }); + + /** + * Calls CreateWorkflowInvocation. + * @function createWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest} request CreateWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|deleteWorkflowInvocation}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef DeleteWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteWorkflowInvocation. + * @function deleteWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest} request DeleteWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.DeleteWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteWorkflowInvocation = function deleteWorkflowInvocation(request, callback) { + return this.rpcCall(deleteWorkflowInvocation, $root.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWorkflowInvocation" }); + + /** + * Calls DeleteWorkflowInvocation. + * @function deleteWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest} request DeleteWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|cancelWorkflowInvocation}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CancelWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelWorkflowInvocation. + * @function cancelWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest} request CancelWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CancelWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.cancelWorkflowInvocation = function cancelWorkflowInvocation(request, callback) { + return this.rpcCall(cancelWorkflowInvocation, $root.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelWorkflowInvocation" }); + + /** + * Calls CancelWorkflowInvocation. + * @function cancelWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest} request CancelWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|queryWorkflowInvocationActions}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef QueryWorkflowInvocationActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} [response] QueryWorkflowInvocationActionsResponse + */ + + /** + * Calls QueryWorkflowInvocationActions. + * @function queryWorkflowInvocationActions + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest} request QueryWorkflowInvocationActionsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.QueryWorkflowInvocationActionsCallback} callback Node-style callback called with the error, if any, and QueryWorkflowInvocationActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryWorkflowInvocationActions = function queryWorkflowInvocationActions(request, callback) { + return this.rpcCall(queryWorkflowInvocationActions, $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest, $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse, request, callback); + }, "name", { value: "QueryWorkflowInvocationActions" }); + + /** + * Calls QueryWorkflowInvocationActions. + * @function queryWorkflowInvocationActions + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest} request QueryWorkflowInvocationActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Dataform; + })(); + + v1beta1.Repository = (function() { + + /** + * Properties of a Repository. + * @memberof google.cloud.dataform.v1beta1 + * @interface IRepository + * @property {string|null} [name] Repository name + * @property {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings|null} [gitRemoteSettings] Repository gitRemoteSettings + */ + + /** + * Constructs a new Repository. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a Repository. + * @implements IRepository + * @constructor + * @param {google.cloud.dataform.v1beta1.IRepository=} [properties] Properties to set + */ + function Repository(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Repository name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.Repository + * @instance + */ + Repository.prototype.name = ""; + + /** + * Repository gitRemoteSettings. + * @member {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings|null|undefined} gitRemoteSettings + * @memberof google.cloud.dataform.v1beta1.Repository + * @instance + */ + Repository.prototype.gitRemoteSettings = null; + + /** + * Creates a new Repository instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {google.cloud.dataform.v1beta1.IRepository=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.Repository} Repository instance + */ + Repository.create = function create(properties) { + return new Repository(properties); + }; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {google.cloud.dataform.v1beta1.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.gitRemoteSettings != null && Object.hasOwnProperty.call(message, "gitRemoteSettings")) + $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.encode(message.gitRemoteSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {google.cloud.dataform.v1beta1.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.Repository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.gitRemoteSettings = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Repository message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Repository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.gitRemoteSettings != null && message.hasOwnProperty("gitRemoteSettings")) { + var error = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify(message.gitRemoteSettings); + if (error) + return "gitRemoteSettings." + error; + } + return null; + }; + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.Repository} Repository + */ + Repository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.Repository) + return object; + var message = new $root.google.cloud.dataform.v1beta1.Repository(); + if (object.name != null) + message.name = String(object.name); + if (object.gitRemoteSettings != null) { + if (typeof object.gitRemoteSettings !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.Repository.gitRemoteSettings: object expected"); + message.gitRemoteSettings = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.fromObject(object.gitRemoteSettings); + } + return message; + }; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {google.cloud.dataform.v1beta1.Repository} message Repository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Repository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.gitRemoteSettings = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gitRemoteSettings != null && message.hasOwnProperty("gitRemoteSettings")) + object.gitRemoteSettings = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.toObject(message.gitRemoteSettings, options); + return object; + }; + + /** + * Converts this Repository to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.Repository + * @instance + * @returns {Object.} JSON object + */ + Repository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Repository + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Repository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.Repository"; + }; + + Repository.GitRemoteSettings = (function() { + + /** + * Properties of a GitRemoteSettings. + * @memberof google.cloud.dataform.v1beta1.Repository + * @interface IGitRemoteSettings + * @property {string|null} [url] GitRemoteSettings url + * @property {string|null} [defaultBranch] GitRemoteSettings defaultBranch + * @property {string|null} [authenticationTokenSecretVersion] GitRemoteSettings authenticationTokenSecretVersion + * @property {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus|null} [tokenStatus] GitRemoteSettings tokenStatus + */ + + /** + * Constructs a new GitRemoteSettings. + * @memberof google.cloud.dataform.v1beta1.Repository + * @classdesc Represents a GitRemoteSettings. + * @implements IGitRemoteSettings + * @constructor + * @param {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings=} [properties] Properties to set + */ + function GitRemoteSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GitRemoteSettings url. + * @member {string} url + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.url = ""; + + /** + * GitRemoteSettings defaultBranch. + * @member {string} defaultBranch + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.defaultBranch = ""; + + /** + * GitRemoteSettings authenticationTokenSecretVersion. + * @member {string} authenticationTokenSecretVersion + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.authenticationTokenSecretVersion = ""; + + /** + * GitRemoteSettings tokenStatus. + * @member {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus} tokenStatus + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.tokenStatus = 0; + + /** + * Creates a new GitRemoteSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} GitRemoteSettings instance + */ + GitRemoteSettings.create = function create(properties) { + return new GitRemoteSettings(properties); + }; + + /** + * Encodes the specified GitRemoteSettings message. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings} message GitRemoteSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitRemoteSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.defaultBranch != null && Object.hasOwnProperty.call(message, "defaultBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultBranch); + if (message.authenticationTokenSecretVersion != null && Object.hasOwnProperty.call(message, "authenticationTokenSecretVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.authenticationTokenSecretVersion); + if (message.tokenStatus != null && Object.hasOwnProperty.call(message, "tokenStatus")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.tokenStatus); + return writer; + }; + + /** + * Encodes the specified GitRemoteSettings message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings} message GitRemoteSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitRemoteSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitRemoteSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.url = reader.string(); + break; + } + case 2: { + message.defaultBranch = reader.string(); + break; + } + case 3: { + message.authenticationTokenSecretVersion = reader.string(); + break; + } + case 4: { + message.tokenStatus = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitRemoteSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitRemoteSettings message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitRemoteSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.defaultBranch != null && message.hasOwnProperty("defaultBranch")) + if (!$util.isString(message.defaultBranch)) + return "defaultBranch: string expected"; + if (message.authenticationTokenSecretVersion != null && message.hasOwnProperty("authenticationTokenSecretVersion")) + if (!$util.isString(message.authenticationTokenSecretVersion)) + return "authenticationTokenSecretVersion: string expected"; + if (message.tokenStatus != null && message.hasOwnProperty("tokenStatus")) + switch (message.tokenStatus) { + default: + return "tokenStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a GitRemoteSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} GitRemoteSettings + */ + GitRemoteSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings) + return object; + var message = new $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings(); + if (object.url != null) + message.url = String(object.url); + if (object.defaultBranch != null) + message.defaultBranch = String(object.defaultBranch); + if (object.authenticationTokenSecretVersion != null) + message.authenticationTokenSecretVersion = String(object.authenticationTokenSecretVersion); + switch (object.tokenStatus) { + default: + if (typeof object.tokenStatus === "number") { + message.tokenStatus = object.tokenStatus; + break; + } + break; + case "TOKEN_STATUS_UNSPECIFIED": + case 0: + message.tokenStatus = 0; + break; + case "NOT_FOUND": + case 1: + message.tokenStatus = 1; + break; + case "INVALID": + case 2: + message.tokenStatus = 2; + break; + case "VALID": + case 3: + message.tokenStatus = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a GitRemoteSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} message GitRemoteSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitRemoteSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + object.defaultBranch = ""; + object.authenticationTokenSecretVersion = ""; + object.tokenStatus = options.enums === String ? "TOKEN_STATUS_UNSPECIFIED" : 0; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.defaultBranch != null && message.hasOwnProperty("defaultBranch")) + object.defaultBranch = message.defaultBranch; + if (message.authenticationTokenSecretVersion != null && message.hasOwnProperty("authenticationTokenSecretVersion")) + object.authenticationTokenSecretVersion = message.authenticationTokenSecretVersion; + if (message.tokenStatus != null && message.hasOwnProperty("tokenStatus")) + object.tokenStatus = options.enums === String ? $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] === undefined ? message.tokenStatus : $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] : message.tokenStatus; + return object; + }; + + /** + * Converts this GitRemoteSettings to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + * @returns {Object.} JSON object + */ + GitRemoteSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GitRemoteSettings + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GitRemoteSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.Repository.GitRemoteSettings"; + }; + + /** + * TokenStatus enum. + * @name google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus + * @enum {number} + * @property {number} TOKEN_STATUS_UNSPECIFIED=0 TOKEN_STATUS_UNSPECIFIED value + * @property {number} NOT_FOUND=1 NOT_FOUND value + * @property {number} INVALID=2 INVALID value + * @property {number} VALID=3 VALID value + */ + GitRemoteSettings.TokenStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TOKEN_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "NOT_FOUND"] = 1; + values[valuesById[2] = "INVALID"] = 2; + values[valuesById[3] = "VALID"] = 3; + return values; + })(); + + return GitRemoteSettings; + })(); + + return Repository; + })(); + + v1beta1.ListRepositoriesRequest = (function() { + + /** + * Properties of a ListRepositoriesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListRepositoriesRequest + * @property {string|null} [parent] ListRepositoriesRequest parent + * @property {number|null} [pageSize] ListRepositoriesRequest pageSize + * @property {string|null} [pageToken] ListRepositoriesRequest pageToken + * @property {string|null} [orderBy] ListRepositoriesRequest orderBy + * @property {string|null} [filter] ListRepositoriesRequest filter + */ + + /** + * Constructs a new ListRepositoriesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListRepositoriesRequest. + * @implements IListRepositoriesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest=} [properties] Properties to set + */ + function ListRepositoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.parent = ""; + + /** + * ListRepositoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageSize = 0; + + /** + * ListRepositoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageToken = ""; + + /** + * ListRepositoriesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.orderBy = ""; + + /** + * ListRepositoriesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.filter = ""; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesRequest} ListRepositoriesRequest instance + */ + ListRepositoriesRequest.create = function create(properties) { + return new ListRepositoriesRequest(properties); + }; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListRepositoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesRequest} ListRepositoriesRequest + */ + ListRepositoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListRepositoriesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListRepositoriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ListRepositoriesRequest} message ListRepositoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRepositoriesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListRepositoriesRequest"; + }; + + return ListRepositoriesRequest; + })(); + + v1beta1.ListRepositoriesResponse = (function() { + + /** + * Properties of a ListRepositoriesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListRepositoriesResponse + * @property {Array.|null} [repositories] ListRepositoriesResponse repositories + * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken + * @property {Array.|null} [unreachable] ListRepositoriesResponse unreachable + */ + + /** + * Constructs a new ListRepositoriesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListRepositoriesResponse. + * @implements IListRepositoriesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IListRepositoriesResponse=} [properties] Properties to set + */ + function ListRepositoriesResponse(properties) { + this.repositories = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesResponse repositories. + * @member {Array.} repositories + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.repositories = $util.emptyArray; + + /** + * ListRepositoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.nextPageToken = ""; + + /** + * ListRepositoriesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesResponse} ListRepositoriesResponse instance + */ + ListRepositoriesResponse.create = function create(properties) { + return new ListRepositoriesResponse(properties); + }; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repositories != null && message.repositories.length) + for (var i = 0; i < message.repositories.length; ++i) + $root.google.cloud.dataform.v1beta1.Repository.encode(message.repositories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListRepositoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.repositories && message.repositories.length)) + message.repositories = []; + message.repositories.push($root.google.cloud.dataform.v1beta1.Repository.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repositories != null && message.hasOwnProperty("repositories")) { + if (!Array.isArray(message.repositories)) + return "repositories: array expected"; + for (var i = 0; i < message.repositories.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Repository.verify(message.repositories[i]); + if (error) + return "repositories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesResponse} ListRepositoriesResponse + */ + ListRepositoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListRepositoriesResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListRepositoriesResponse(); + if (object.repositories) { + if (!Array.isArray(object.repositories)) + throw TypeError(".google.cloud.dataform.v1beta1.ListRepositoriesResponse.repositories: array expected"); + message.repositories = []; + for (var i = 0; i < object.repositories.length; ++i) { + if (typeof object.repositories[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.ListRepositoriesResponse.repositories: object expected"); + message.repositories[i] = $root.google.cloud.dataform.v1beta1.Repository.fromObject(object.repositories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1beta1.ListRepositoriesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1beta1.ListRepositoriesResponse} message ListRepositoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.repositories = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.repositories && message.repositories.length) { + object.repositories = []; + for (var j = 0; j < message.repositories.length; ++j) + object.repositories[j] = $root.google.cloud.dataform.v1beta1.Repository.toObject(message.repositories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRepositoriesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListRepositoriesResponse"; + }; + + return ListRepositoriesResponse; + })(); + + v1beta1.GetRepositoryRequest = (function() { + + /** + * Properties of a GetRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IGetRepositoryRequest + * @property {string|null} [name] GetRepositoryRequest name + */ + + /** + * Constructs a new GetRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a GetRepositoryRequest. + * @implements IGetRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest=} [properties] Properties to set + */ + function GetRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetRepositoryRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @instance + */ + GetRepositoryRequest.prototype.name = ""; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.GetRepositoryRequest} GetRepositoryRequest instance + */ + GetRepositoryRequest.create = function create(properties) { + return new GetRepositoryRequest(properties); + }; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.GetRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.GetRepositoryRequest} GetRepositoryRequest + */ + GetRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.GetRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.GetRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.GetRepositoryRequest} message GetRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.GetRepositoryRequest"; + }; + + return GetRepositoryRequest; + })(); + + v1beta1.CreateRepositoryRequest = (function() { + + /** + * Properties of a CreateRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICreateRepositoryRequest + * @property {string|null} [parent] CreateRepositoryRequest parent + * @property {google.cloud.dataform.v1beta1.IRepository|null} [repository] CreateRepositoryRequest repository + * @property {string|null} [repositoryId] CreateRepositoryRequest repositoryId + */ + + /** + * Constructs a new CreateRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CreateRepositoryRequest. + * @implements ICreateRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest=} [properties] Properties to set + */ + function CreateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateRepositoryRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.parent = ""; + + /** + * CreateRepositoryRequest repository. + * @member {google.cloud.dataform.v1beta1.IRepository|null|undefined} repository + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repository = null; + + /** + * CreateRepositoryRequest repositoryId. + * @member {string} repositoryId + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repositoryId = ""; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CreateRepositoryRequest} CreateRepositoryRequest instance + */ + CreateRepositoryRequest.create = function create(properties) { + return new CreateRepositoryRequest(properties); + }; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.dataform.v1beta1.Repository.encode(message.repository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repositoryId != null && Object.hasOwnProperty.call(message, "repositoryId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.repositoryId); + return writer; + }; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CreateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.repository = $root.google.cloud.dataform.v1beta1.Repository.decode(reader, reader.uint32()); + break; + } + case 3: { + message.repositoryId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.cloud.dataform.v1beta1.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + if (!$util.isString(message.repositoryId)) + return "repositoryId: string expected"; + return null; + }; + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CreateRepositoryRequest} CreateRepositoryRequest + */ + CreateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CreateRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CreateRepositoryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CreateRepositoryRequest.repository: object expected"); + message.repository = $root.google.cloud.dataform.v1beta1.Repository.fromObject(object.repository); + } + if (object.repositoryId != null) + message.repositoryId = String(object.repositoryId); + return message; + }; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.CreateRepositoryRequest} message CreateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.repository = null; + object.repositoryId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.cloud.dataform.v1beta1.Repository.toObject(message.repository, options); + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + object.repositoryId = message.repositoryId; + return object; + }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CreateRepositoryRequest"; + }; + + return CreateRepositoryRequest; + })(); + + v1beta1.UpdateRepositoryRequest = (function() { + + /** + * Properties of an UpdateRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IUpdateRepositoryRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateRepositoryRequest updateMask + * @property {google.cloud.dataform.v1beta1.IRepository|null} [repository] UpdateRepositoryRequest repository + */ + + /** + * Constructs a new UpdateRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents an UpdateRepositoryRequest. + * @implements IUpdateRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest=} [properties] Properties to set + */ + function UpdateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateRepositoryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.updateMask = null; + + /** + * UpdateRepositoryRequest repository. + * @member {google.cloud.dataform.v1beta1.IRepository|null|undefined} repository + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.repository = null; + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} UpdateRepositoryRequest instance + */ + UpdateRepositoryRequest.create = function create(properties) { + return new UpdateRepositoryRequest(properties); + }; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.UpdateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.dataform.v1beta1.Repository.encode(message.repository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.UpdateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.UpdateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.repository = $root.google.cloud.dataform.v1beta1.Repository.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.cloud.dataform.v1beta1.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + return null; + }; + + /** + * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} UpdateRepositoryRequest + */ + UpdateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.UpdateRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.UpdateRepositoryRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.UpdateRepositoryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.UpdateRepositoryRequest.repository: object expected"); + message.repository = $root.google.cloud.dataform.v1beta1.Repository.fromObject(object.repository); + } + return message; + }; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} message UpdateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.repository = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.cloud.dataform.v1beta1.Repository.toObject(message.repository, options); + return object; + }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.UpdateRepositoryRequest"; + }; + + return UpdateRepositoryRequest; + })(); + + v1beta1.DeleteRepositoryRequest = (function() { + + /** + * Properties of a DeleteRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IDeleteRepositoryRequest + * @property {string|null} [name] DeleteRepositoryRequest name + * @property {boolean|null} [force] DeleteRepositoryRequest force + */ + + /** + * Constructs a new DeleteRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a DeleteRepositoryRequest. + * @implements IDeleteRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest=} [properties] Properties to set + */ + function DeleteRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteRepositoryRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.name = ""; + + /** + * DeleteRepositoryRequest force. + * @member {boolean} force + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.force = false; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} DeleteRepositoryRequest instance + */ + DeleteRepositoryRequest.create = function create(properties) { + return new DeleteRepositoryRequest(properties); + }; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.DeleteRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} DeleteRepositoryRequest + */ + DeleteRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.DeleteRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.DeleteRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} message DeleteRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.DeleteRepositoryRequest"; + }; + + return DeleteRepositoryRequest; + })(); + + v1beta1.FetchRemoteBranchesRequest = (function() { + + /** + * Properties of a FetchRemoteBranchesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchRemoteBranchesRequest + * @property {string|null} [name] FetchRemoteBranchesRequest name + */ + + /** + * Constructs a new FetchRemoteBranchesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchRemoteBranchesRequest. + * @implements IFetchRemoteBranchesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest=} [properties] Properties to set + */ + function FetchRemoteBranchesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchRemoteBranchesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @instance + */ + FetchRemoteBranchesRequest.prototype.name = ""; + + /** + * Creates a new FetchRemoteBranchesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest instance + */ + FetchRemoteBranchesRequest.create = function create(properties) { + return new FetchRemoteBranchesRequest(properties); + }; + + /** + * Encodes the specified FetchRemoteBranchesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest} message FetchRemoteBranchesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified FetchRemoteBranchesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest} message FetchRemoteBranchesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchRemoteBranchesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchRemoteBranchesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a FetchRemoteBranchesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + */ + FetchRemoteBranchesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FetchRemoteBranchesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} message FetchRemoteBranchesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchRemoteBranchesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this FetchRemoteBranchesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchRemoteBranchesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchRemoteBranchesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchRemoteBranchesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest"; + }; + + return FetchRemoteBranchesRequest; + })(); + + v1beta1.FetchRemoteBranchesResponse = (function() { + + /** + * Properties of a FetchRemoteBranchesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchRemoteBranchesResponse + * @property {Array.|null} [branches] FetchRemoteBranchesResponse branches + */ + + /** + * Constructs a new FetchRemoteBranchesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchRemoteBranchesResponse. + * @implements IFetchRemoteBranchesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse=} [properties] Properties to set + */ + function FetchRemoteBranchesResponse(properties) { + this.branches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchRemoteBranchesResponse branches. + * @member {Array.} branches + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @instance + */ + FetchRemoteBranchesResponse.prototype.branches = $util.emptyArray; + + /** + * Creates a new FetchRemoteBranchesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse instance + */ + FetchRemoteBranchesResponse.create = function create(properties) { + return new FetchRemoteBranchesResponse(properties); + }; + + /** + * Encodes the specified FetchRemoteBranchesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse} message FetchRemoteBranchesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.branches != null && message.branches.length) + for (var i = 0; i < message.branches.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.branches[i]); + return writer; + }; + + /** + * Encodes the specified FetchRemoteBranchesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse} message FetchRemoteBranchesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.branches && message.branches.length)) + message.branches = []; + message.branches.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchRemoteBranchesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchRemoteBranchesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.branches != null && message.hasOwnProperty("branches")) { + if (!Array.isArray(message.branches)) + return "branches: array expected"; + for (var i = 0; i < message.branches.length; ++i) + if (!$util.isString(message.branches[i])) + return "branches: string[] expected"; + } + return null; + }; + + /** + * Creates a FetchRemoteBranchesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + */ + FetchRemoteBranchesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse(); + if (object.branches) { + if (!Array.isArray(object.branches)) + throw TypeError(".google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.branches: array expected"); + message.branches = []; + for (var i = 0; i < object.branches.length; ++i) + message.branches[i] = String(object.branches[i]); + } + return message; + }; + + /** + * Creates a plain object from a FetchRemoteBranchesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} message FetchRemoteBranchesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchRemoteBranchesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.branches = []; + if (message.branches && message.branches.length) { + object.branches = []; + for (var j = 0; j < message.branches.length; ++j) + object.branches[j] = message.branches[j]; + } + return object; + }; + + /** + * Converts this FetchRemoteBranchesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchRemoteBranchesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchRemoteBranchesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchRemoteBranchesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse"; + }; + + return FetchRemoteBranchesResponse; + })(); + + v1beta1.Workspace = (function() { + + /** + * Properties of a Workspace. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWorkspace + * @property {string|null} [name] Workspace name + */ + + /** + * Constructs a new Workspace. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a Workspace. + * @implements IWorkspace + * @constructor + * @param {google.cloud.dataform.v1beta1.IWorkspace=} [properties] Properties to set + */ + function Workspace(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Workspace name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.Workspace + * @instance + */ + Workspace.prototype.name = ""; + + /** + * Creates a new Workspace instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {google.cloud.dataform.v1beta1.IWorkspace=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.Workspace} Workspace instance + */ + Workspace.create = function create(properties) { + return new Workspace(properties); + }; + + /** + * Encodes the specified Workspace message. Does not implicitly {@link google.cloud.dataform.v1beta1.Workspace.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {google.cloud.dataform.v1beta1.IWorkspace} message Workspace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Workspace.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified Workspace message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Workspace.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {google.cloud.dataform.v1beta1.IWorkspace} message Workspace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Workspace.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Workspace message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.Workspace} Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Workspace.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.Workspace(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Workspace message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.Workspace} Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Workspace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Workspace message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Workspace.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Workspace message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.Workspace} Workspace + */ + Workspace.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.Workspace) + return object; + var message = new $root.google.cloud.dataform.v1beta1.Workspace(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Workspace message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {google.cloud.dataform.v1beta1.Workspace} message Workspace + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Workspace.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Workspace to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.Workspace + * @instance + * @returns {Object.} JSON object + */ + Workspace.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Workspace + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Workspace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.Workspace"; + }; + + return Workspace; + })(); + + v1beta1.ListWorkspacesRequest = (function() { + + /** + * Properties of a ListWorkspacesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListWorkspacesRequest + * @property {string|null} [parent] ListWorkspacesRequest parent + * @property {number|null} [pageSize] ListWorkspacesRequest pageSize + * @property {string|null} [pageToken] ListWorkspacesRequest pageToken + * @property {string|null} [orderBy] ListWorkspacesRequest orderBy + * @property {string|null} [filter] ListWorkspacesRequest filter + */ + + /** + * Constructs a new ListWorkspacesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListWorkspacesRequest. + * @implements IListWorkspacesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest=} [properties] Properties to set + */ + function ListWorkspacesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkspacesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.parent = ""; + + /** + * ListWorkspacesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.pageSize = 0; + + /** + * ListWorkspacesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.pageToken = ""; + + /** + * ListWorkspacesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.orderBy = ""; + + /** + * ListWorkspacesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.filter = ""; + + /** + * Creates a new ListWorkspacesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesRequest} ListWorkspacesRequest instance + */ + ListWorkspacesRequest.create = function create(properties) { + return new ListWorkspacesRequest(properties); + }; + + /** + * Encodes the specified ListWorkspacesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest} message ListWorkspacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListWorkspacesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest} message ListWorkspacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesRequest} ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListWorkspacesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesRequest} ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkspacesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkspacesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListWorkspacesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesRequest} ListWorkspacesRequest + */ + ListWorkspacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListWorkspacesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListWorkspacesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListWorkspacesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ListWorkspacesRequest} message ListWorkspacesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkspacesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListWorkspacesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkspacesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkspacesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkspacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListWorkspacesRequest"; + }; + + return ListWorkspacesRequest; + })(); + + v1beta1.ListWorkspacesResponse = (function() { + + /** + * Properties of a ListWorkspacesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListWorkspacesResponse + * @property {Array.|null} [workspaces] ListWorkspacesResponse workspaces + * @property {string|null} [nextPageToken] ListWorkspacesResponse nextPageToken + * @property {Array.|null} [unreachable] ListWorkspacesResponse unreachable + */ + + /** + * Constructs a new ListWorkspacesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListWorkspacesResponse. + * @implements IListWorkspacesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IListWorkspacesResponse=} [properties] Properties to set + */ + function ListWorkspacesResponse(properties) { + this.workspaces = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkspacesResponse workspaces. + * @member {Array.} workspaces + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.workspaces = $util.emptyArray; + + /** + * ListWorkspacesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.nextPageToken = ""; + + /** + * ListWorkspacesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListWorkspacesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesResponse} ListWorkspacesResponse instance + */ + ListWorkspacesResponse.create = function create(properties) { + return new ListWorkspacesResponse(properties); + }; + + /** + * Encodes the specified ListWorkspacesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesResponse} message ListWorkspacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspaces != null && message.workspaces.length) + for (var i = 0; i < message.workspaces.length; ++i) + $root.google.cloud.dataform.v1beta1.Workspace.encode(message.workspaces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListWorkspacesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesResponse} message ListWorkspacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesResponse} ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListWorkspacesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.workspaces && message.workspaces.length)) + message.workspaces = []; + message.workspaces.push($root.google.cloud.dataform.v1beta1.Workspace.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesResponse} ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkspacesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkspacesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspaces != null && message.hasOwnProperty("workspaces")) { + if (!Array.isArray(message.workspaces)) + return "workspaces: array expected"; + for (var i = 0; i < message.workspaces.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Workspace.verify(message.workspaces[i]); + if (error) + return "workspaces." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListWorkspacesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesResponse} ListWorkspacesResponse + */ + ListWorkspacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListWorkspacesResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListWorkspacesResponse(); + if (object.workspaces) { + if (!Array.isArray(object.workspaces)) + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkspacesResponse.workspaces: array expected"); + message.workspaces = []; + for (var i = 0; i < object.workspaces.length; ++i) { + if (typeof object.workspaces[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkspacesResponse.workspaces: object expected"); + message.workspaces[i] = $root.google.cloud.dataform.v1beta1.Workspace.fromObject(object.workspaces[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkspacesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListWorkspacesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1beta1.ListWorkspacesResponse} message ListWorkspacesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkspacesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.workspaces = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.workspaces && message.workspaces.length) { + object.workspaces = []; + for (var j = 0; j < message.workspaces.length; ++j) + object.workspaces[j] = $root.google.cloud.dataform.v1beta1.Workspace.toObject(message.workspaces[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListWorkspacesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkspacesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkspacesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkspacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListWorkspacesResponse"; + }; + + return ListWorkspacesResponse; + })(); + + v1beta1.GetWorkspaceRequest = (function() { + + /** + * Properties of a GetWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IGetWorkspaceRequest + * @property {string|null} [name] GetWorkspaceRequest name + */ + + /** + * Constructs a new GetWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a GetWorkspaceRequest. + * @implements IGetWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest=} [properties] Properties to set + */ + function GetWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @instance + */ + GetWorkspaceRequest.prototype.name = ""; + + /** + * Creates a new GetWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.GetWorkspaceRequest} GetWorkspaceRequest instance + */ + GetWorkspaceRequest.create = function create(properties) { + return new GetWorkspaceRequest(properties); + }; + + /** + * Encodes the specified GetWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest} message GetWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkspaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest} message GetWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.GetWorkspaceRequest} GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.GetWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.GetWorkspaceRequest} GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkspaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.GetWorkspaceRequest} GetWorkspaceRequest + */ + GetWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.GetWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.GetWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.GetWorkspaceRequest} message GetWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.GetWorkspaceRequest"; + }; + + return GetWorkspaceRequest; + })(); + + v1beta1.CreateWorkspaceRequest = (function() { + + /** + * Properties of a CreateWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICreateWorkspaceRequest + * @property {string|null} [parent] CreateWorkspaceRequest parent + * @property {google.cloud.dataform.v1beta1.IWorkspace|null} [workspace] CreateWorkspaceRequest workspace + * @property {string|null} [workspaceId] CreateWorkspaceRequest workspaceId + */ + + /** + * Constructs a new CreateWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CreateWorkspaceRequest. + * @implements ICreateWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest=} [properties] Properties to set + */ + function CreateWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateWorkspaceRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.parent = ""; + + /** + * CreateWorkspaceRequest workspace. + * @member {google.cloud.dataform.v1beta1.IWorkspace|null|undefined} workspace + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.workspace = null; + + /** + * CreateWorkspaceRequest workspaceId. + * @member {string} workspaceId + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.workspaceId = ""; + + /** + * Creates a new CreateWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} CreateWorkspaceRequest instance + */ + CreateWorkspaceRequest.create = function create(properties) { + return new CreateWorkspaceRequest(properties); + }; + + /** + * Encodes the specified CreateWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest} message CreateWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkspaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + $root.google.cloud.dataform.v1beta1.Workspace.encode(message.workspace, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.workspaceId != null && Object.hasOwnProperty.call(message, "workspaceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workspaceId); + return writer; + }; + + /** + * Encodes the specified CreateWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest} message CreateWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CreateWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.workspace = $root.google.cloud.dataform.v1beta1.Workspace.decode(reader, reader.uint32()); + break; + } + case 3: { + message.workspaceId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWorkspaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) { + var error = $root.google.cloud.dataform.v1beta1.Workspace.verify(message.workspace); + if (error) + return "workspace." + error; + } + if (message.workspaceId != null && message.hasOwnProperty("workspaceId")) + if (!$util.isString(message.workspaceId)) + return "workspaceId: string expected"; + return null; + }; + + /** + * Creates a CreateWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} CreateWorkspaceRequest + */ + CreateWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CreateWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CreateWorkspaceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.workspace != null) { + if (typeof object.workspace !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CreateWorkspaceRequest.workspace: object expected"); + message.workspace = $root.google.cloud.dataform.v1beta1.Workspace.fromObject(object.workspace); + } + if (object.workspaceId != null) + message.workspaceId = String(object.workspaceId); + return message; + }; + + /** + * Creates a plain object from a CreateWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} message CreateWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.workspace = null; + object.workspaceId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = $root.google.cloud.dataform.v1beta1.Workspace.toObject(message.workspace, options); + if (message.workspaceId != null && message.hasOwnProperty("workspaceId")) + object.workspaceId = message.workspaceId; + return object; + }; + + /** + * Converts this CreateWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CreateWorkspaceRequest"; + }; + + return CreateWorkspaceRequest; + })(); + + v1beta1.DeleteWorkspaceRequest = (function() { + + /** + * Properties of a DeleteWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IDeleteWorkspaceRequest + * @property {string|null} [name] DeleteWorkspaceRequest name + */ + + /** + * Constructs a new DeleteWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a DeleteWorkspaceRequest. + * @implements IDeleteWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest=} [properties] Properties to set + */ + function DeleteWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @instance + */ + DeleteWorkspaceRequest.prototype.name = ""; + + /** + * Creates a new DeleteWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} DeleteWorkspaceRequest instance + */ + DeleteWorkspaceRequest.create = function create(properties) { + return new DeleteWorkspaceRequest(properties); + }; + + /** + * Encodes the specified DeleteWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest} message DeleteWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkspaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest} message DeleteWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteWorkspaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} DeleteWorkspaceRequest + */ + DeleteWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} message DeleteWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.DeleteWorkspaceRequest"; + }; + + return DeleteWorkspaceRequest; + })(); + + v1beta1.CommitAuthor = (function() { + + /** + * Properties of a CommitAuthor. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICommitAuthor + * @property {string|null} [name] CommitAuthor name + * @property {string|null} [emailAddress] CommitAuthor emailAddress + */ + + /** + * Constructs a new CommitAuthor. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CommitAuthor. + * @implements ICommitAuthor + * @constructor + * @param {google.cloud.dataform.v1beta1.ICommitAuthor=} [properties] Properties to set + */ + function CommitAuthor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitAuthor name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @instance + */ + CommitAuthor.prototype.name = ""; + + /** + * CommitAuthor emailAddress. + * @member {string} emailAddress + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @instance + */ + CommitAuthor.prototype.emailAddress = ""; + + /** + * Creates a new CommitAuthor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {google.cloud.dataform.v1beta1.ICommitAuthor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CommitAuthor} CommitAuthor instance + */ + CommitAuthor.create = function create(properties) { + return new CommitAuthor(properties); + }; + + /** + * Encodes the specified CommitAuthor message. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitAuthor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {google.cloud.dataform.v1beta1.ICommitAuthor} message CommitAuthor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitAuthor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.emailAddress != null && Object.hasOwnProperty.call(message, "emailAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.emailAddress); + return writer; + }; + + /** + * Encodes the specified CommitAuthor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitAuthor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {google.cloud.dataform.v1beta1.ICommitAuthor} message CommitAuthor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitAuthor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CommitAuthor} CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitAuthor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CommitAuthor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.emailAddress = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CommitAuthor} CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitAuthor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitAuthor message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitAuthor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) + if (!$util.isString(message.emailAddress)) + return "emailAddress: string expected"; + return null; + }; + + /** + * Creates a CommitAuthor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CommitAuthor} CommitAuthor + */ + CommitAuthor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CommitAuthor) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CommitAuthor(); + if (object.name != null) + message.name = String(object.name); + if (object.emailAddress != null) + message.emailAddress = String(object.emailAddress); + return message; + }; + + /** + * Creates a plain object from a CommitAuthor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {google.cloud.dataform.v1beta1.CommitAuthor} message CommitAuthor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitAuthor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.emailAddress = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) + object.emailAddress = message.emailAddress; + return object; + }; + + /** + * Converts this CommitAuthor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @instance + * @returns {Object.} JSON object + */ + CommitAuthor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommitAuthor + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommitAuthor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CommitAuthor"; + }; + + return CommitAuthor; + })(); + + v1beta1.PullGitCommitsRequest = (function() { + + /** + * Properties of a PullGitCommitsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IPullGitCommitsRequest + * @property {string|null} [name] PullGitCommitsRequest name + * @property {string|null} [remoteBranch] PullGitCommitsRequest remoteBranch + * @property {google.cloud.dataform.v1beta1.ICommitAuthor|null} [author] PullGitCommitsRequest author + */ + + /** + * Constructs a new PullGitCommitsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a PullGitCommitsRequest. + * @implements IPullGitCommitsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest=} [properties] Properties to set + */ + function PullGitCommitsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PullGitCommitsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.name = ""; + + /** + * PullGitCommitsRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.remoteBranch = ""; + + /** + * PullGitCommitsRequest author. + * @member {google.cloud.dataform.v1beta1.ICommitAuthor|null|undefined} author + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.author = null; + + /** + * Creates a new PullGitCommitsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.PullGitCommitsRequest} PullGitCommitsRequest instance + */ + PullGitCommitsRequest.create = function create(properties) { + return new PullGitCommitsRequest(properties); + }; + + /** + * Encodes the specified PullGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.PullGitCommitsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest} message PullGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullGitCommitsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + $root.google.cloud.dataform.v1beta1.CommitAuthor.encode(message.author, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PullGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.PullGitCommitsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest} message PullGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullGitCommitsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.PullGitCommitsRequest} PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullGitCommitsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.PullGitCommitsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteBranch = reader.string(); + break; + } + case 3: { + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.PullGitCommitsRequest} PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullGitCommitsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PullGitCommitsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullGitCommitsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + if (message.author != null && message.hasOwnProperty("author")) { + var error = $root.google.cloud.dataform.v1beta1.CommitAuthor.verify(message.author); + if (error) + return "author." + error; + } + return null; + }; + + /** + * Creates a PullGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.PullGitCommitsRequest} PullGitCommitsRequest + */ + PullGitCommitsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.PullGitCommitsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.PullGitCommitsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + if (object.author != null) { + if (typeof object.author !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.PullGitCommitsRequest.author: object expected"); + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.fromObject(object.author); + } + return message; + }; + + /** + * Creates a plain object from a PullGitCommitsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.PullGitCommitsRequest} message PullGitCommitsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullGitCommitsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + object.author = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + if (message.author != null && message.hasOwnProperty("author")) + object.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.toObject(message.author, options); + return object; + }; + + /** + * Converts this PullGitCommitsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @instance + * @returns {Object.} JSON object + */ + PullGitCommitsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PullGitCommitsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PullGitCommitsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.PullGitCommitsRequest"; + }; + + return PullGitCommitsRequest; + })(); + + v1beta1.PushGitCommitsRequest = (function() { + + /** + * Properties of a PushGitCommitsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IPushGitCommitsRequest + * @property {string|null} [name] PushGitCommitsRequest name + * @property {string|null} [remoteBranch] PushGitCommitsRequest remoteBranch + */ + + /** + * Constructs a new PushGitCommitsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a PushGitCommitsRequest. + * @implements IPushGitCommitsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest=} [properties] Properties to set + */ + function PushGitCommitsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PushGitCommitsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @instance + */ + PushGitCommitsRequest.prototype.name = ""; + + /** + * PushGitCommitsRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @instance + */ + PushGitCommitsRequest.prototype.remoteBranch = ""; + + /** + * Creates a new PushGitCommitsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.PushGitCommitsRequest} PushGitCommitsRequest instance + */ + PushGitCommitsRequest.create = function create(properties) { + return new PushGitCommitsRequest(properties); + }; + + /** + * Encodes the specified PushGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.PushGitCommitsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest} message PushGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushGitCommitsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + return writer; + }; + + /** + * Encodes the specified PushGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.PushGitCommitsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest} message PushGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushGitCommitsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.PushGitCommitsRequest} PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushGitCommitsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.PushGitCommitsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteBranch = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.PushGitCommitsRequest} PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushGitCommitsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PushGitCommitsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PushGitCommitsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + return null; + }; + + /** + * Creates a PushGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.PushGitCommitsRequest} PushGitCommitsRequest + */ + PushGitCommitsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.PushGitCommitsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.PushGitCommitsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + return message; + }; + + /** + * Creates a plain object from a PushGitCommitsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.PushGitCommitsRequest} message PushGitCommitsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushGitCommitsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + return object; + }; + + /** + * Converts this PushGitCommitsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @instance + * @returns {Object.} JSON object + */ + PushGitCommitsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PushGitCommitsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PushGitCommitsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.PushGitCommitsRequest"; + }; + + return PushGitCommitsRequest; + })(); + + v1beta1.FetchFileGitStatusesRequest = (function() { + + /** + * Properties of a FetchFileGitStatusesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchFileGitStatusesRequest + * @property {string|null} [name] FetchFileGitStatusesRequest name + */ + + /** + * Constructs a new FetchFileGitStatusesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchFileGitStatusesRequest. + * @implements IFetchFileGitStatusesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest=} [properties] Properties to set + */ + function FetchFileGitStatusesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileGitStatusesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @instance + */ + FetchFileGitStatusesRequest.prototype.name = ""; + + /** + * Creates a new FetchFileGitStatusesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest instance + */ + FetchFileGitStatusesRequest.create = function create(properties) { + return new FetchFileGitStatusesRequest(properties); + }; + + /** + * Encodes the specified FetchFileGitStatusesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest} message FetchFileGitStatusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified FetchFileGitStatusesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest} message FetchFileGitStatusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileGitStatusesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileGitStatusesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a FetchFileGitStatusesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + */ + FetchFileGitStatusesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FetchFileGitStatusesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} message FetchFileGitStatusesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileGitStatusesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this FetchFileGitStatusesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchFileGitStatusesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchFileGitStatusesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileGitStatusesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest"; + }; + + return FetchFileGitStatusesRequest; + })(); + + v1beta1.FetchFileGitStatusesResponse = (function() { + + /** + * Properties of a FetchFileGitStatusesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchFileGitStatusesResponse + * @property {Array.|null} [uncommittedFileChanges] FetchFileGitStatusesResponse uncommittedFileChanges + */ + + /** + * Constructs a new FetchFileGitStatusesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchFileGitStatusesResponse. + * @implements IFetchFileGitStatusesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse=} [properties] Properties to set + */ + function FetchFileGitStatusesResponse(properties) { + this.uncommittedFileChanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileGitStatusesResponse uncommittedFileChanges. + * @member {Array.} uncommittedFileChanges + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @instance + */ + FetchFileGitStatusesResponse.prototype.uncommittedFileChanges = $util.emptyArray; + + /** + * Creates a new FetchFileGitStatusesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse instance + */ + FetchFileGitStatusesResponse.create = function create(properties) { + return new FetchFileGitStatusesResponse(properties); + }; + + /** + * Encodes the specified FetchFileGitStatusesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse} message FetchFileGitStatusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uncommittedFileChanges != null && message.uncommittedFileChanges.length) + for (var i = 0; i < message.uncommittedFileChanges.length; ++i) + $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.encode(message.uncommittedFileChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FetchFileGitStatusesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse} message FetchFileGitStatusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.uncommittedFileChanges && message.uncommittedFileChanges.length)) + message.uncommittedFileChanges = []; + message.uncommittedFileChanges.push($root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileGitStatusesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileGitStatusesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uncommittedFileChanges != null && message.hasOwnProperty("uncommittedFileChanges")) { + if (!Array.isArray(message.uncommittedFileChanges)) + return "uncommittedFileChanges: array expected"; + for (var i = 0; i < message.uncommittedFileChanges.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify(message.uncommittedFileChanges[i]); + if (error) + return "uncommittedFileChanges." + error; + } + } + return null; + }; + + /** + * Creates a FetchFileGitStatusesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + */ + FetchFileGitStatusesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse(); + if (object.uncommittedFileChanges) { + if (!Array.isArray(object.uncommittedFileChanges)) + throw TypeError(".google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.uncommittedFileChanges: array expected"); + message.uncommittedFileChanges = []; + for (var i = 0; i < object.uncommittedFileChanges.length; ++i) { + if (typeof object.uncommittedFileChanges[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.uncommittedFileChanges: object expected"); + message.uncommittedFileChanges[i] = $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.fromObject(object.uncommittedFileChanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FetchFileGitStatusesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} message FetchFileGitStatusesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileGitStatusesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uncommittedFileChanges = []; + if (message.uncommittedFileChanges && message.uncommittedFileChanges.length) { + object.uncommittedFileChanges = []; + for (var j = 0; j < message.uncommittedFileChanges.length; ++j) + object.uncommittedFileChanges[j] = $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.toObject(message.uncommittedFileChanges[j], options); + } + return object; + }; + + /** + * Converts this FetchFileGitStatusesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchFileGitStatusesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchFileGitStatusesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileGitStatusesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse"; + }; + + FetchFileGitStatusesResponse.UncommittedFileChange = (function() { + + /** + * Properties of an UncommittedFileChange. + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @interface IUncommittedFileChange + * @property {string|null} [path] UncommittedFileChange path + * @property {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State|null} [state] UncommittedFileChange state + */ + + /** + * Constructs a new UncommittedFileChange. + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @classdesc Represents an UncommittedFileChange. + * @implements IUncommittedFileChange + * @constructor + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange=} [properties] Properties to set + */ + function UncommittedFileChange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UncommittedFileChange path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + */ + UncommittedFileChange.prototype.path = ""; + + /** + * UncommittedFileChange state. + * @member {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State} state + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + */ + UncommittedFileChange.prototype.state = 0; + + /** + * Creates a new UncommittedFileChange instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange instance + */ + UncommittedFileChange.create = function create(properties) { + return new UncommittedFileChange(properties); + }; + + /** + * Encodes the specified UncommittedFileChange message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange} message UncommittedFileChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UncommittedFileChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + return writer; + }; + + /** + * Encodes the specified UncommittedFileChange message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange} message UncommittedFileChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UncommittedFileChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UncommittedFileChange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.path = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UncommittedFileChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UncommittedFileChange message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UncommittedFileChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates an UncommittedFileChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + */ + UncommittedFileChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange(); + if (object.path != null) + message.path = String(object.path); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ADDED": + case 1: + message.state = 1; + break; + case "DELETED": + case 2: + message.state = 2; + break; + case "MODIFIED": + case 3: + message.state = 3; + break; + case "HAS_CONFLICTS": + case 4: + message.state = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from an UncommittedFileChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} message UncommittedFileChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UncommittedFileChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.path = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] === undefined ? message.state : $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] : message.state; + return object; + }; + + /** + * Converts this UncommittedFileChange to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + * @returns {Object.} JSON object + */ + UncommittedFileChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UncommittedFileChange + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UncommittedFileChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange"; + }; + + /** + * State enum. + * @name google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ADDED=1 ADDED value + * @property {number} DELETED=2 DELETED value + * @property {number} MODIFIED=3 MODIFIED value + * @property {number} HAS_CONFLICTS=4 HAS_CONFLICTS value + */ + UncommittedFileChange.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADDED"] = 1; + values[valuesById[2] = "DELETED"] = 2; + values[valuesById[3] = "MODIFIED"] = 3; + values[valuesById[4] = "HAS_CONFLICTS"] = 4; + return values; + })(); + + return UncommittedFileChange; + })(); + + return FetchFileGitStatusesResponse; + })(); + + v1beta1.FetchGitAheadBehindRequest = (function() { + + /** + * Properties of a FetchGitAheadBehindRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchGitAheadBehindRequest + * @property {string|null} [name] FetchGitAheadBehindRequest name + * @property {string|null} [remoteBranch] FetchGitAheadBehindRequest remoteBranch + */ + + /** + * Constructs a new FetchGitAheadBehindRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchGitAheadBehindRequest. + * @implements IFetchGitAheadBehindRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest=} [properties] Properties to set + */ + function FetchGitAheadBehindRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchGitAheadBehindRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @instance + */ + FetchGitAheadBehindRequest.prototype.name = ""; + + /** + * FetchGitAheadBehindRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @instance + */ + FetchGitAheadBehindRequest.prototype.remoteBranch = ""; + + /** + * Creates a new FetchGitAheadBehindRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest instance + */ + FetchGitAheadBehindRequest.create = function create(properties) { + return new FetchGitAheadBehindRequest(properties); + }; + + /** + * Encodes the specified FetchGitAheadBehindRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest} message FetchGitAheadBehindRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + return writer; + }; + + /** + * Encodes the specified FetchGitAheadBehindRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest} message FetchGitAheadBehindRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteBranch = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchGitAheadBehindRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchGitAheadBehindRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + return null; + }; + + /** + * Creates a FetchGitAheadBehindRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + */ + FetchGitAheadBehindRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + return message; + }; + + /** + * Creates a plain object from a FetchGitAheadBehindRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} message FetchGitAheadBehindRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchGitAheadBehindRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + return object; + }; + + /** + * Converts this FetchGitAheadBehindRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @instance + * @returns {Object.} JSON object + */ + FetchGitAheadBehindRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchGitAheadBehindRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchGitAheadBehindRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest"; + }; + + return FetchGitAheadBehindRequest; + })(); + + v1beta1.FetchGitAheadBehindResponse = (function() { + + /** + * Properties of a FetchGitAheadBehindResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchGitAheadBehindResponse + * @property {number|null} [commitsAhead] FetchGitAheadBehindResponse commitsAhead + * @property {number|null} [commitsBehind] FetchGitAheadBehindResponse commitsBehind + */ + + /** + * Constructs a new FetchGitAheadBehindResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchGitAheadBehindResponse. + * @implements IFetchGitAheadBehindResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse=} [properties] Properties to set + */ + function FetchGitAheadBehindResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchGitAheadBehindResponse commitsAhead. + * @member {number} commitsAhead + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @instance + */ + FetchGitAheadBehindResponse.prototype.commitsAhead = 0; + + /** + * FetchGitAheadBehindResponse commitsBehind. + * @member {number} commitsBehind + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @instance + */ + FetchGitAheadBehindResponse.prototype.commitsBehind = 0; + + /** + * Creates a new FetchGitAheadBehindResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse instance + */ + FetchGitAheadBehindResponse.create = function create(properties) { + return new FetchGitAheadBehindResponse(properties); + }; + + /** + * Encodes the specified FetchGitAheadBehindResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse} message FetchGitAheadBehindResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commitsAhead != null && Object.hasOwnProperty.call(message, "commitsAhead")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.commitsAhead); + if (message.commitsBehind != null && Object.hasOwnProperty.call(message, "commitsBehind")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.commitsBehind); + return writer; + }; + + /** + * Encodes the specified FetchGitAheadBehindResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse} message FetchGitAheadBehindResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.commitsAhead = reader.int32(); + break; + } + case 2: { + message.commitsBehind = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchGitAheadBehindResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchGitAheadBehindResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commitsAhead != null && message.hasOwnProperty("commitsAhead")) + if (!$util.isInteger(message.commitsAhead)) + return "commitsAhead: integer expected"; + if (message.commitsBehind != null && message.hasOwnProperty("commitsBehind")) + if (!$util.isInteger(message.commitsBehind)) + return "commitsBehind: integer expected"; + return null; + }; + + /** + * Creates a FetchGitAheadBehindResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + */ + FetchGitAheadBehindResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse(); + if (object.commitsAhead != null) + message.commitsAhead = object.commitsAhead | 0; + if (object.commitsBehind != null) + message.commitsBehind = object.commitsBehind | 0; + return message; + }; + + /** + * Creates a plain object from a FetchGitAheadBehindResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} message FetchGitAheadBehindResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchGitAheadBehindResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.commitsAhead = 0; + object.commitsBehind = 0; + } + if (message.commitsAhead != null && message.hasOwnProperty("commitsAhead")) + object.commitsAhead = message.commitsAhead; + if (message.commitsBehind != null && message.hasOwnProperty("commitsBehind")) + object.commitsBehind = message.commitsBehind; + return object; + }; + + /** + * Converts this FetchGitAheadBehindResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @instance + * @returns {Object.} JSON object + */ + FetchGitAheadBehindResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchGitAheadBehindResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchGitAheadBehindResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse"; + }; + + return FetchGitAheadBehindResponse; + })(); + + v1beta1.CommitWorkspaceChangesRequest = (function() { + + /** + * Properties of a CommitWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICommitWorkspaceChangesRequest + * @property {string|null} [name] CommitWorkspaceChangesRequest name + * @property {google.cloud.dataform.v1beta1.ICommitAuthor|null} [author] CommitWorkspaceChangesRequest author + * @property {string|null} [commitMessage] CommitWorkspaceChangesRequest commitMessage + * @property {Array.|null} [paths] CommitWorkspaceChangesRequest paths + */ + + /** + * Constructs a new CommitWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CommitWorkspaceChangesRequest. + * @implements ICommitWorkspaceChangesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest=} [properties] Properties to set + */ + function CommitWorkspaceChangesRequest(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitWorkspaceChangesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.name = ""; + + /** + * CommitWorkspaceChangesRequest author. + * @member {google.cloud.dataform.v1beta1.ICommitAuthor|null|undefined} author + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.author = null; + + /** + * CommitWorkspaceChangesRequest commitMessage. + * @member {string} commitMessage + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.commitMessage = ""; + + /** + * CommitWorkspaceChangesRequest paths. + * @member {Array.} paths + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.paths = $util.emptyArray; + + /** + * Creates a new CommitWorkspaceChangesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest instance + */ + CommitWorkspaceChangesRequest.create = function create(properties) { + return new CommitWorkspaceChangesRequest(properties); + }; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitWorkspaceChangesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.commitMessage != null && Object.hasOwnProperty.call(message, "commitMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commitMessage); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.paths[i]); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + $root.google.cloud.dataform.v1beta1.CommitAuthor.encode(message.author, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitWorkspaceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitWorkspaceChangesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 4: { + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.decode(reader, reader.uint32()); + break; + } + case 2: { + message.commitMessage = reader.string(); + break; + } + case 3: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitWorkspaceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitWorkspaceChangesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitWorkspaceChangesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.author != null && message.hasOwnProperty("author")) { + var error = $root.google.cloud.dataform.v1beta1.CommitAuthor.verify(message.author); + if (error) + return "author." + error; + } + if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) + if (!$util.isString(message.commitMessage)) + return "commitMessage: string expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a CommitWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + */ + CommitWorkspaceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.author != null) { + if (typeof object.author !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.author: object expected"); + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.fromObject(object.author); + } + if (object.commitMessage != null) + message.commitMessage = String(object.commitMessage); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a CommitWorkspaceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitWorkspaceChangesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.name = ""; + object.commitMessage = ""; + object.author = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) + object.commitMessage = message.commitMessage; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.author != null && message.hasOwnProperty("author")) + object.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.toObject(message.author, options); + return object; + }; + + /** + * Converts this CommitWorkspaceChangesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + CommitWorkspaceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommitWorkspaceChangesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommitWorkspaceChangesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest"; + }; + + return CommitWorkspaceChangesRequest; + })(); + + v1beta1.ResetWorkspaceChangesRequest = (function() { + + /** + * Properties of a ResetWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IResetWorkspaceChangesRequest + * @property {string|null} [name] ResetWorkspaceChangesRequest name + * @property {Array.|null} [paths] ResetWorkspaceChangesRequest paths + * @property {boolean|null} [clean] ResetWorkspaceChangesRequest clean + */ + + /** + * Constructs a new ResetWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ResetWorkspaceChangesRequest. + * @implements IResetWorkspaceChangesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest=} [properties] Properties to set + */ + function ResetWorkspaceChangesRequest(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResetWorkspaceChangesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.name = ""; + + /** + * ResetWorkspaceChangesRequest paths. + * @member {Array.} paths + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.paths = $util.emptyArray; + + /** + * ResetWorkspaceChangesRequest clean. + * @member {boolean} clean + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.clean = false; + + /** + * Creates a new ResetWorkspaceChangesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest instance + */ + ResetWorkspaceChangesRequest.create = function create(properties) { + return new ResetWorkspaceChangesRequest(properties); + }; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetWorkspaceChangesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.paths[i]); + if (message.clean != null && Object.hasOwnProperty.call(message, "clean")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.clean); + return writer; + }; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetWorkspaceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetWorkspaceChangesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + case 3: { + message.clean = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetWorkspaceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResetWorkspaceChangesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResetWorkspaceChangesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + if (message.clean != null && message.hasOwnProperty("clean")) + if (typeof message.clean !== "boolean") + return "clean: boolean expected"; + return null; + }; + + /** + * Creates a ResetWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + */ + ResetWorkspaceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + if (object.clean != null) + message.clean = Boolean(object.clean); + return message; + }; + + /** + * Creates a plain object from a ResetWorkspaceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResetWorkspaceChangesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.name = ""; + object.clean = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.clean != null && message.hasOwnProperty("clean")) + object.clean = message.clean; + return object; + }; + + /** + * Converts this ResetWorkspaceChangesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + ResetWorkspaceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResetWorkspaceChangesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResetWorkspaceChangesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest"; + }; + + return ResetWorkspaceChangesRequest; + })(); + + v1beta1.FetchFileDiffRequest = (function() { + + /** + * Properties of a FetchFileDiffRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchFileDiffRequest + * @property {string|null} [workspace] FetchFileDiffRequest workspace + * @property {string|null} [path] FetchFileDiffRequest path + */ + + /** + * Constructs a new FetchFileDiffRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchFileDiffRequest. + * @implements IFetchFileDiffRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest=} [properties] Properties to set + */ + function FetchFileDiffRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileDiffRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @instance + */ + FetchFileDiffRequest.prototype.workspace = ""; + + /** + * FetchFileDiffRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @instance + */ + FetchFileDiffRequest.prototype.path = ""; + + /** + * Creates a new FetchFileDiffRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffRequest} FetchFileDiffRequest instance + */ + FetchFileDiffRequest.create = function create(properties) { + return new FetchFileDiffRequest(properties); + }; + + /** + * Encodes the specified FetchFileDiffRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest} message FetchFileDiffRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified FetchFileDiffRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest} message FetchFileDiffRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffRequest} FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileDiffRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffRequest} FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileDiffRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileDiffRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a FetchFileDiffRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffRequest} FetchFileDiffRequest + */ + FetchFileDiffRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileDiffRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileDiffRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a FetchFileDiffRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileDiffRequest} message FetchFileDiffRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileDiffRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this FetchFileDiffRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @instance + * @returns {Object.} JSON object + */ + FetchFileDiffRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchFileDiffRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileDiffRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchFileDiffRequest"; + }; + + return FetchFileDiffRequest; + })(); + + v1beta1.FetchFileDiffResponse = (function() { + + /** + * Properties of a FetchFileDiffResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchFileDiffResponse + * @property {string|null} [formattedDiff] FetchFileDiffResponse formattedDiff + */ + + /** + * Constructs a new FetchFileDiffResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchFileDiffResponse. + * @implements IFetchFileDiffResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffResponse=} [properties] Properties to set + */ + function FetchFileDiffResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileDiffResponse formattedDiff. + * @member {string} formattedDiff + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @instance + */ + FetchFileDiffResponse.prototype.formattedDiff = ""; + + /** + * Creates a new FetchFileDiffResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffResponse} FetchFileDiffResponse instance + */ + FetchFileDiffResponse.create = function create(properties) { + return new FetchFileDiffResponse(properties); + }; + + /** + * Encodes the specified FetchFileDiffResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffResponse} message FetchFileDiffResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.formattedDiff != null && Object.hasOwnProperty.call(message, "formattedDiff")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.formattedDiff); + return writer; + }; + + /** + * Encodes the specified FetchFileDiffResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffResponse} message FetchFileDiffResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffResponse} FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileDiffResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.formattedDiff = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffResponse} FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileDiffResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileDiffResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.formattedDiff != null && message.hasOwnProperty("formattedDiff")) + if (!$util.isString(message.formattedDiff)) + return "formattedDiff: string expected"; + return null; + }; + + /** + * Creates a FetchFileDiffResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffResponse} FetchFileDiffResponse + */ + FetchFileDiffResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileDiffResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileDiffResponse(); + if (object.formattedDiff != null) + message.formattedDiff = String(object.formattedDiff); + return message; + }; + + /** + * Creates a plain object from a FetchFileDiffResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileDiffResponse} message FetchFileDiffResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileDiffResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.formattedDiff = ""; + if (message.formattedDiff != null && message.hasOwnProperty("formattedDiff")) + object.formattedDiff = message.formattedDiff; + return object; + }; + + /** + * Converts this FetchFileDiffResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @instance + * @returns {Object.} JSON object + */ + FetchFileDiffResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchFileDiffResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileDiffResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchFileDiffResponse"; + }; + + return FetchFileDiffResponse; + })(); + + v1beta1.QueryDirectoryContentsRequest = (function() { + + /** + * Properties of a QueryDirectoryContentsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryDirectoryContentsRequest + * @property {string|null} [workspace] QueryDirectoryContentsRequest workspace + * @property {string|null} [path] QueryDirectoryContentsRequest path + * @property {number|null} [pageSize] QueryDirectoryContentsRequest pageSize + * @property {string|null} [pageToken] QueryDirectoryContentsRequest pageToken + */ + + /** + * Constructs a new QueryDirectoryContentsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryDirectoryContentsRequest. + * @implements IQueryDirectoryContentsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest=} [properties] Properties to set + */ + function QueryDirectoryContentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDirectoryContentsRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.workspace = ""; + + /** + * QueryDirectoryContentsRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.path = ""; + + /** + * QueryDirectoryContentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.pageSize = 0; + + /** + * QueryDirectoryContentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.pageToken = ""; + + /** + * Creates a new QueryDirectoryContentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest instance + */ + QueryDirectoryContentsRequest.create = function create(properties) { + return new QueryDirectoryContentsRequest(properties); + }; + + /** + * Encodes the specified QueryDirectoryContentsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest} message QueryDirectoryContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified QueryDirectoryContentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest} message QueryDirectoryContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDirectoryContentsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDirectoryContentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a QueryDirectoryContentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + */ + QueryDirectoryContentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a QueryDirectoryContentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} message QueryDirectoryContentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDirectoryContentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this QueryDirectoryContentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDirectoryContentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryDirectoryContentsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryDirectoryContentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest"; + }; + + return QueryDirectoryContentsRequest; + })(); + + v1beta1.QueryDirectoryContentsResponse = (function() { + + /** + * Properties of a QueryDirectoryContentsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryDirectoryContentsResponse + * @property {Array.|null} [directoryEntries] QueryDirectoryContentsResponse directoryEntries + * @property {string|null} [nextPageToken] QueryDirectoryContentsResponse nextPageToken + */ + + /** + * Constructs a new QueryDirectoryContentsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryDirectoryContentsResponse. + * @implements IQueryDirectoryContentsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse=} [properties] Properties to set + */ + function QueryDirectoryContentsResponse(properties) { + this.directoryEntries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDirectoryContentsResponse directoryEntries. + * @member {Array.} directoryEntries + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @instance + */ + QueryDirectoryContentsResponse.prototype.directoryEntries = $util.emptyArray; + + /** + * QueryDirectoryContentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @instance + */ + QueryDirectoryContentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryDirectoryContentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse instance + */ + QueryDirectoryContentsResponse.create = function create(properties) { + return new QueryDirectoryContentsResponse(properties); + }; + + /** + * Encodes the specified QueryDirectoryContentsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse} message QueryDirectoryContentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.directoryEntries != null && message.directoryEntries.length) + for (var i = 0; i < message.directoryEntries.length; ++i) + $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.encode(message.directoryEntries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified QueryDirectoryContentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse} message QueryDirectoryContentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.directoryEntries && message.directoryEntries.length)) + message.directoryEntries = []; + message.directoryEntries.push($root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDirectoryContentsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDirectoryContentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.directoryEntries != null && message.hasOwnProperty("directoryEntries")) { + if (!Array.isArray(message.directoryEntries)) + return "directoryEntries: array expected"; + for (var i = 0; i < message.directoryEntries.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify(message.directoryEntries[i]); + if (error) + return "directoryEntries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryDirectoryContentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + */ + QueryDirectoryContentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse(); + if (object.directoryEntries) { + if (!Array.isArray(object.directoryEntries)) + throw TypeError(".google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.directoryEntries: array expected"); + message.directoryEntries = []; + for (var i = 0; i < object.directoryEntries.length; ++i) { + if (typeof object.directoryEntries[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.directoryEntries: object expected"); + message.directoryEntries[i] = $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.fromObject(object.directoryEntries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryDirectoryContentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} message QueryDirectoryContentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDirectoryContentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.directoryEntries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.directoryEntries && message.directoryEntries.length) { + object.directoryEntries = []; + for (var j = 0; j < message.directoryEntries.length; ++j) + object.directoryEntries[j] = $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.toObject(message.directoryEntries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryDirectoryContentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDirectoryContentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryDirectoryContentsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryDirectoryContentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse"; + }; + + QueryDirectoryContentsResponse.DirectoryEntry = (function() { + + /** + * Properties of a DirectoryEntry. + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @interface IDirectoryEntry + * @property {string|null} [file] DirectoryEntry file + * @property {string|null} [directory] DirectoryEntry directory + */ + + /** + * Constructs a new DirectoryEntry. + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @classdesc Represents a DirectoryEntry. + * @implements IDirectoryEntry + * @constructor + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry=} [properties] Properties to set + */ + function DirectoryEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DirectoryEntry file. + * @member {string|null|undefined} file + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + DirectoryEntry.prototype.file = null; + + /** + * DirectoryEntry directory. + * @member {string|null|undefined} directory + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + DirectoryEntry.prototype.directory = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DirectoryEntry entry. + * @member {"file"|"directory"|undefined} entry + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + Object.defineProperty(DirectoryEntry.prototype, "entry", { + get: $util.oneOfGetter($oneOfFields = ["file", "directory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DirectoryEntry instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry instance + */ + DirectoryEntry.create = function create(properties) { + return new DirectoryEntry(properties); + }; + + /** + * Encodes the specified DirectoryEntry message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry} message DirectoryEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectoryEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); + if (message.directory != null && Object.hasOwnProperty.call(message, "directory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.directory); + return writer; + }; + + /** + * Encodes the specified DirectoryEntry message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry} message DirectoryEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectoryEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectoryEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.file = reader.string(); + break; + } + case 2: { + message.directory = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectoryEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DirectoryEntry message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DirectoryEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.file != null && message.hasOwnProperty("file")) { + properties.entry = 1; + if (!$util.isString(message.file)) + return "file: string expected"; + } + if (message.directory != null && message.hasOwnProperty("directory")) { + if (properties.entry === 1) + return "entry: multiple values"; + properties.entry = 1; + if (!$util.isString(message.directory)) + return "directory: string expected"; + } + return null; + }; + + /** + * Creates a DirectoryEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + */ + DirectoryEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry(); + if (object.file != null) + message.file = String(object.file); + if (object.directory != null) + message.directory = String(object.directory); + return message; + }; + + /** + * Creates a plain object from a DirectoryEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} message DirectoryEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DirectoryEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.file != null && message.hasOwnProperty("file")) { + object.file = message.file; + if (options.oneofs) + object.entry = "file"; + } + if (message.directory != null && message.hasOwnProperty("directory")) { + object.directory = message.directory; + if (options.oneofs) + object.entry = "directory"; + } + return object; + }; + + /** + * Converts this DirectoryEntry to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + * @returns {Object.} JSON object + */ + DirectoryEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DirectoryEntry + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DirectoryEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry"; + }; + + return DirectoryEntry; + })(); + + return QueryDirectoryContentsResponse; + })(); + + v1beta1.MakeDirectoryRequest = (function() { + + /** + * Properties of a MakeDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMakeDirectoryRequest + * @property {string|null} [workspace] MakeDirectoryRequest workspace + * @property {string|null} [path] MakeDirectoryRequest path + */ + + /** + * Constructs a new MakeDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MakeDirectoryRequest. + * @implements IMakeDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest=} [properties] Properties to set + */ + function MakeDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MakeDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @instance + */ + MakeDirectoryRequest.prototype.workspace = ""; + + /** + * MakeDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @instance + */ + MakeDirectoryRequest.prototype.path = ""; + + /** + * Creates a new MakeDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryRequest} MakeDirectoryRequest instance + */ + MakeDirectoryRequest.create = function create(properties) { + return new MakeDirectoryRequest(properties); + }; + + /** + * Encodes the specified MakeDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest} message MakeDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified MakeDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest} message MakeDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryRequest} MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MakeDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryRequest} MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MakeDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MakeDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a MakeDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryRequest} MakeDirectoryRequest + */ + MakeDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MakeDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.MakeDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a MakeDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.MakeDirectoryRequest} message MakeDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MakeDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this MakeDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + MakeDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MakeDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MakeDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.MakeDirectoryRequest"; + }; + + return MakeDirectoryRequest; + })(); + + v1beta1.MakeDirectoryResponse = (function() { + + /** + * Properties of a MakeDirectoryResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMakeDirectoryResponse + */ + + /** + * Constructs a new MakeDirectoryResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MakeDirectoryResponse. + * @implements IMakeDirectoryResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryResponse=} [properties] Properties to set + */ + function MakeDirectoryResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MakeDirectoryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryResponse} MakeDirectoryResponse instance + */ + MakeDirectoryResponse.create = function create(properties) { + return new MakeDirectoryResponse(properties); + }; + + /** + * Encodes the specified MakeDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryResponse} message MakeDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MakeDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryResponse} message MakeDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryResponse} MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MakeDirectoryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryResponse} MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MakeDirectoryResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MakeDirectoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MakeDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryResponse} MakeDirectoryResponse + */ + MakeDirectoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MakeDirectoryResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.MakeDirectoryResponse(); + }; + + /** + * Creates a plain object from a MakeDirectoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.MakeDirectoryResponse} message MakeDirectoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MakeDirectoryResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MakeDirectoryResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @instance + * @returns {Object.} JSON object + */ + MakeDirectoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MakeDirectoryResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MakeDirectoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.MakeDirectoryResponse"; + }; + + return MakeDirectoryResponse; + })(); + + v1beta1.RemoveDirectoryRequest = (function() { + + /** + * Properties of a RemoveDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IRemoveDirectoryRequest + * @property {string|null} [workspace] RemoveDirectoryRequest workspace + * @property {string|null} [path] RemoveDirectoryRequest path + */ + + /** + * Constructs a new RemoveDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a RemoveDirectoryRequest. + * @implements IRemoveDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest=} [properties] Properties to set + */ + function RemoveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @instance + */ + RemoveDirectoryRequest.prototype.workspace = ""; + + /** + * RemoveDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @instance + */ + RemoveDirectoryRequest.prototype.path = ""; + + /** + * Creates a new RemoveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} RemoveDirectoryRequest instance + */ + RemoveDirectoryRequest.create = function create(properties) { + return new RemoveDirectoryRequest(properties); + }; + + /** + * Encodes the specified RemoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest} message RemoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified RemoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest} message RemoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.RemoveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a RemoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} RemoveDirectoryRequest + */ + RemoveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.RemoveDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.RemoveDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a RemoveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} message RemoveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this RemoveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.RemoveDirectoryRequest"; + }; + + return RemoveDirectoryRequest; + })(); + + v1beta1.MoveDirectoryRequest = (function() { + + /** + * Properties of a MoveDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMoveDirectoryRequest + * @property {string|null} [workspace] MoveDirectoryRequest workspace + * @property {string|null} [path] MoveDirectoryRequest path + * @property {string|null} [newPath] MoveDirectoryRequest newPath + */ + + /** + * Constructs a new MoveDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MoveDirectoryRequest. + * @implements IMoveDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest=} [properties] Properties to set + */ + function MoveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MoveDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.workspace = ""; + + /** + * MoveDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.path = ""; + + /** + * MoveDirectoryRequest newPath. + * @member {string} newPath + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.newPath = ""; + + /** + * Creates a new MoveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryRequest} MoveDirectoryRequest instance + */ + MoveDirectoryRequest.create = function create(properties) { + return new MoveDirectoryRequest(properties); + }; + + /** + * Encodes the specified MoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest} message MoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.newPath != null && Object.hasOwnProperty.call(message, "newPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newPath); + return writer; + }; + + /** + * Encodes the specified MoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest} message MoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryRequest} MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MoveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.newPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryRequest} MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.newPath != null && message.hasOwnProperty("newPath")) + if (!$util.isString(message.newPath)) + return "newPath: string expected"; + return null; + }; + + /** + * Creates a MoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryRequest} MoveDirectoryRequest + */ + MoveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MoveDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.MoveDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.newPath != null) + message.newPath = String(object.newPath); + return message; + }; + + /** + * Creates a plain object from a MoveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.MoveDirectoryRequest} message MoveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.newPath = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.newPath != null && message.hasOwnProperty("newPath")) + object.newPath = message.newPath; + return object; + }; + + /** + * Converts this MoveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + MoveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MoveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.MoveDirectoryRequest"; + }; + + return MoveDirectoryRequest; + })(); + + v1beta1.MoveDirectoryResponse = (function() { + + /** + * Properties of a MoveDirectoryResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMoveDirectoryResponse + */ + + /** + * Constructs a new MoveDirectoryResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MoveDirectoryResponse. + * @implements IMoveDirectoryResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryResponse=} [properties] Properties to set + */ + function MoveDirectoryResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MoveDirectoryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryResponse} MoveDirectoryResponse instance + */ + MoveDirectoryResponse.create = function create(properties) { + return new MoveDirectoryResponse(properties); + }; + + /** + * Encodes the specified MoveDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryResponse} message MoveDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MoveDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryResponse} message MoveDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryResponse} MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MoveDirectoryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryResponse} MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveDirectoryResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveDirectoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MoveDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryResponse} MoveDirectoryResponse + */ + MoveDirectoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MoveDirectoryResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.MoveDirectoryResponse(); + }; + + /** + * Creates a plain object from a MoveDirectoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.MoveDirectoryResponse} message MoveDirectoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveDirectoryResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MoveDirectoryResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @instance + * @returns {Object.} JSON object + */ + MoveDirectoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MoveDirectoryResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveDirectoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.MoveDirectoryResponse"; + }; + + return MoveDirectoryResponse; + })(); + + v1beta1.ReadFileRequest = (function() { + + /** + * Properties of a ReadFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IReadFileRequest + * @property {string|null} [workspace] ReadFileRequest workspace + * @property {string|null} [path] ReadFileRequest path + */ + + /** + * Constructs a new ReadFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ReadFileRequest. + * @implements IReadFileRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IReadFileRequest=} [properties] Properties to set + */ + function ReadFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @instance + */ + ReadFileRequest.prototype.workspace = ""; + + /** + * ReadFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @instance + */ + ReadFileRequest.prototype.path = ""; + + /** + * Creates a new ReadFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ReadFileRequest} ReadFileRequest instance + */ + ReadFileRequest.create = function create(properties) { + return new ReadFileRequest(properties); + }; + + /** + * Encodes the specified ReadFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileRequest} message ReadFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified ReadFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileRequest} message ReadFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ReadFileRequest} ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ReadFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ReadFileRequest} ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a ReadFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ReadFileRequest} ReadFileRequest + */ + ReadFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ReadFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ReadFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a ReadFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.ReadFileRequest} message ReadFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this ReadFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @instance + * @returns {Object.} JSON object + */ + ReadFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ReadFileRequest"; + }; + + return ReadFileRequest; + })(); + + v1beta1.ReadFileResponse = (function() { + + /** + * Properties of a ReadFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IReadFileResponse + * @property {Uint8Array|null} [fileContents] ReadFileResponse fileContents + */ + + /** + * Constructs a new ReadFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ReadFileResponse. + * @implements IReadFileResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IReadFileResponse=} [properties] Properties to set + */ + function ReadFileResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadFileResponse fileContents. + * @member {Uint8Array} fileContents + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @instance + */ + ReadFileResponse.prototype.fileContents = $util.newBuffer([]); + + /** + * Creates a new ReadFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ReadFileResponse} ReadFileResponse instance + */ + ReadFileResponse.create = function create(properties) { + return new ReadFileResponse(properties); + }; + + /** + * Encodes the specified ReadFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileResponse} message ReadFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileContents != null && Object.hasOwnProperty.call(message, "fileContents")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.fileContents); + return writer; + }; + + /** + * Encodes the specified ReadFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileResponse} message ReadFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ReadFileResponse} ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ReadFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fileContents = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ReadFileResponse} ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileContents != null && message.hasOwnProperty("fileContents")) + if (!(message.fileContents && typeof message.fileContents.length === "number" || $util.isString(message.fileContents))) + return "fileContents: buffer expected"; + return null; + }; + + /** + * Creates a ReadFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ReadFileResponse} ReadFileResponse + */ + ReadFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ReadFileResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ReadFileResponse(); + if (object.fileContents != null) + if (typeof object.fileContents === "string") + $util.base64.decode(object.fileContents, message.fileContents = $util.newBuffer($util.base64.length(object.fileContents)), 0); + else if (object.fileContents.length >= 0) + message.fileContents = object.fileContents; + return message; + }; + + /** + * Creates a plain object from a ReadFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.ReadFileResponse} message ReadFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadFileResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.fileContents = ""; + else { + object.fileContents = []; + if (options.bytes !== Array) + object.fileContents = $util.newBuffer(object.fileContents); + } + if (message.fileContents != null && message.hasOwnProperty("fileContents")) + object.fileContents = options.bytes === String ? $util.base64.encode(message.fileContents, 0, message.fileContents.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileContents) : message.fileContents; + return object; + }; + + /** + * Converts this ReadFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @instance + * @returns {Object.} JSON object + */ + ReadFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadFileResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ReadFileResponse"; + }; + + return ReadFileResponse; + })(); + + v1beta1.RemoveFileRequest = (function() { + + /** + * Properties of a RemoveFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IRemoveFileRequest + * @property {string|null} [workspace] RemoveFileRequest workspace + * @property {string|null} [path] RemoveFileRequest path + */ + + /** + * Constructs a new RemoveFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a RemoveFileRequest. + * @implements IRemoveFileRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest=} [properties] Properties to set + */ + function RemoveFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @instance + */ + RemoveFileRequest.prototype.workspace = ""; + + /** + * RemoveFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @instance + */ + RemoveFileRequest.prototype.path = ""; + + /** + * Creates a new RemoveFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.RemoveFileRequest} RemoveFileRequest instance + */ + RemoveFileRequest.create = function create(properties) { + return new RemoveFileRequest(properties); + }; + + /** + * Encodes the specified RemoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest} message RemoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified RemoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest} message RemoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.RemoveFileRequest} RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.RemoveFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.RemoveFileRequest} RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a RemoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.RemoveFileRequest} RemoveFileRequest + */ + RemoveFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.RemoveFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.RemoveFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a RemoveFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.RemoveFileRequest} message RemoveFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this RemoveFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.RemoveFileRequest"; + }; + + return RemoveFileRequest; + })(); + + v1beta1.MoveFileRequest = (function() { + + /** + * Properties of a MoveFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMoveFileRequest + * @property {string|null} [workspace] MoveFileRequest workspace + * @property {string|null} [path] MoveFileRequest path + * @property {string|null} [newPath] MoveFileRequest newPath + */ + + /** + * Constructs a new MoveFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MoveFileRequest. + * @implements IMoveFileRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest=} [properties] Properties to set + */ + function MoveFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MoveFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.workspace = ""; + + /** + * MoveFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.path = ""; + + /** + * MoveFileRequest newPath. + * @member {string} newPath + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.newPath = ""; + + /** + * Creates a new MoveFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MoveFileRequest} MoveFileRequest instance + */ + MoveFileRequest.create = function create(properties) { + return new MoveFileRequest(properties); + }; + + /** + * Encodes the specified MoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest} message MoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.newPath != null && Object.hasOwnProperty.call(message, "newPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newPath); + return writer; + }; + + /** + * Encodes the specified MoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest} message MoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MoveFileRequest} MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MoveFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.newPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MoveFileRequest} MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.newPath != null && message.hasOwnProperty("newPath")) + if (!$util.isString(message.newPath)) + return "newPath: string expected"; + return null; + }; + + /** + * Creates a MoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MoveFileRequest} MoveFileRequest + */ + MoveFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MoveFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.MoveFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.newPath != null) + message.newPath = String(object.newPath); + return message; + }; + + /** + * Creates a plain object from a MoveFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.MoveFileRequest} message MoveFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.newPath = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.newPath != null && message.hasOwnProperty("newPath")) + object.newPath = message.newPath; + return object; + }; + + /** + * Converts this MoveFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @instance + * @returns {Object.} JSON object + */ + MoveFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MoveFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.MoveFileRequest"; + }; + + return MoveFileRequest; + })(); + + v1beta1.MoveFileResponse = (function() { + + /** + * Properties of a MoveFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMoveFileResponse + */ + + /** + * Constructs a new MoveFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MoveFileResponse. + * @implements IMoveFileResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IMoveFileResponse=} [properties] Properties to set + */ + function MoveFileResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MoveFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MoveFileResponse} MoveFileResponse instance + */ + MoveFileResponse.create = function create(properties) { + return new MoveFileResponse(properties); + }; + + /** + * Encodes the specified MoveFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileResponse} message MoveFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MoveFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileResponse} message MoveFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MoveFileResponse} MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MoveFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MoveFileResponse} MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MoveFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MoveFileResponse} MoveFileResponse + */ + MoveFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MoveFileResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.MoveFileResponse(); + }; + + /** + * Creates a plain object from a MoveFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.MoveFileResponse} message MoveFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveFileResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MoveFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @instance + * @returns {Object.} JSON object + */ + MoveFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MoveFileResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.MoveFileResponse"; + }; + + return MoveFileResponse; + })(); + + v1beta1.WriteFileRequest = (function() { + + /** + * Properties of a WriteFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWriteFileRequest + * @property {string|null} [workspace] WriteFileRequest workspace + * @property {string|null} [path] WriteFileRequest path + * @property {Uint8Array|null} [contents] WriteFileRequest contents + */ + + /** + * Constructs a new WriteFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a WriteFileRequest. + * @implements IWriteFileRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest=} [properties] Properties to set + */ + function WriteFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WriteFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.workspace = ""; + + /** + * WriteFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.path = ""; + + /** + * WriteFileRequest contents. + * @member {Uint8Array} contents + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.contents = $util.newBuffer([]); + + /** + * Creates a new WriteFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WriteFileRequest} WriteFileRequest instance + */ + WriteFileRequest.create = function create(properties) { + return new WriteFileRequest(properties); + }; + + /** + * Encodes the specified WriteFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest} message WriteFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.contents != null && Object.hasOwnProperty.call(message, "contents")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.contents); + return writer; + }; + + /** + * Encodes the specified WriteFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest} message WriteFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WriteFileRequest} WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WriteFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.contents = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WriteFileRequest} WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.contents != null && message.hasOwnProperty("contents")) + if (!(message.contents && typeof message.contents.length === "number" || $util.isString(message.contents))) + return "contents: buffer expected"; + return null; + }; + + /** + * Creates a WriteFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WriteFileRequest} WriteFileRequest + */ + WriteFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WriteFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WriteFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.contents != null) + if (typeof object.contents === "string") + $util.base64.decode(object.contents, message.contents = $util.newBuffer($util.base64.length(object.contents)), 0); + else if (object.contents.length >= 0) + message.contents = object.contents; + return message; + }; + + /** + * Creates a plain object from a WriteFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.WriteFileRequest} message WriteFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + if (options.bytes === String) + object.contents = ""; + else { + object.contents = []; + if (options.bytes !== Array) + object.contents = $util.newBuffer(object.contents); + } + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.contents != null && message.hasOwnProperty("contents")) + object.contents = options.bytes === String ? $util.base64.encode(message.contents, 0, message.contents.length) : options.bytes === Array ? Array.prototype.slice.call(message.contents) : message.contents; + return object; + }; + + /** + * Converts this WriteFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @instance + * @returns {Object.} JSON object + */ + WriteFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WriteFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.WriteFileRequest"; + }; + + return WriteFileRequest; + })(); + + v1beta1.WriteFileResponse = (function() { + + /** + * Properties of a WriteFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWriteFileResponse + */ + + /** + * Constructs a new WriteFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a WriteFileResponse. + * @implements IWriteFileResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IWriteFileResponse=} [properties] Properties to set + */ + function WriteFileResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new WriteFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WriteFileResponse} WriteFileResponse instance + */ + WriteFileResponse.create = function create(properties) { + return new WriteFileResponse(properties); + }; + + /** + * Encodes the specified WriteFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileResponse} message WriteFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified WriteFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileResponse} message WriteFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WriteFileResponse} WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WriteFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WriteFileResponse} WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a WriteFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WriteFileResponse} WriteFileResponse + */ + WriteFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WriteFileResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.WriteFileResponse(); + }; + + /** + * Creates a plain object from a WriteFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.WriteFileResponse} message WriteFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteFileResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this WriteFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @instance + * @returns {Object.} JSON object + */ + WriteFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WriteFileResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.WriteFileResponse"; + }; + + return WriteFileResponse; + })(); + + v1beta1.InstallNpmPackagesRequest = (function() { + + /** + * Properties of an InstallNpmPackagesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IInstallNpmPackagesRequest + * @property {string|null} [workspace] InstallNpmPackagesRequest workspace + */ + + /** + * Constructs a new InstallNpmPackagesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents an InstallNpmPackagesRequest. + * @implements IInstallNpmPackagesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest=} [properties] Properties to set + */ + function InstallNpmPackagesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstallNpmPackagesRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @instance + */ + InstallNpmPackagesRequest.prototype.workspace = ""; + + /** + * Creates a new InstallNpmPackagesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} InstallNpmPackagesRequest instance + */ + InstallNpmPackagesRequest.create = function create(properties) { + return new InstallNpmPackagesRequest(properties); + }; + + /** + * Encodes the specified InstallNpmPackagesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest} message InstallNpmPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + return writer; + }; + + /** + * Encodes the specified InstallNpmPackagesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest} message InstallNpmPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workspace = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstallNpmPackagesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstallNpmPackagesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + return null; + }; + + /** + * Creates an InstallNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} InstallNpmPackagesRequest + */ + InstallNpmPackagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + return message; + }; + + /** + * Creates a plain object from an InstallNpmPackagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} message InstallNpmPackagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstallNpmPackagesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.workspace = ""; + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + return object; + }; + + /** + * Converts this InstallNpmPackagesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @instance + * @returns {Object.} JSON object + */ + InstallNpmPackagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstallNpmPackagesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstallNpmPackagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.InstallNpmPackagesRequest"; + }; + + return InstallNpmPackagesRequest; + })(); + + v1beta1.InstallNpmPackagesResponse = (function() { + + /** + * Properties of an InstallNpmPackagesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IInstallNpmPackagesResponse + */ + + /** + * Constructs a new InstallNpmPackagesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents an InstallNpmPackagesResponse. + * @implements IInstallNpmPackagesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse=} [properties] Properties to set + */ + function InstallNpmPackagesResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new InstallNpmPackagesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} InstallNpmPackagesResponse instance + */ + InstallNpmPackagesResponse.create = function create(properties) { + return new InstallNpmPackagesResponse(properties); + }; + + /** + * Encodes the specified InstallNpmPackagesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse} message InstallNpmPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified InstallNpmPackagesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse} message InstallNpmPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstallNpmPackagesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstallNpmPackagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an InstallNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} InstallNpmPackagesResponse + */ + InstallNpmPackagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse(); + }; + + /** + * Creates a plain object from an InstallNpmPackagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} message InstallNpmPackagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstallNpmPackagesResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this InstallNpmPackagesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @instance + * @returns {Object.} JSON object + */ + InstallNpmPackagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstallNpmPackagesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstallNpmPackagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.InstallNpmPackagesResponse"; + }; + + return InstallNpmPackagesResponse; + })(); + + v1beta1.CompilationResult = (function() { + + /** + * Properties of a CompilationResult. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICompilationResult + * @property {string|null} [name] CompilationResult name + * @property {string|null} [gitCommitish] CompilationResult gitCommitish + * @property {string|null} [workspace] CompilationResult workspace + * @property {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig|null} [codeCompilationConfig] CompilationResult codeCompilationConfig + * @property {string|null} [dataformCoreVersion] CompilationResult dataformCoreVersion + * @property {Array.|null} [compilationErrors] CompilationResult compilationErrors + */ + + /** + * Constructs a new CompilationResult. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CompilationResult. + * @implements ICompilationResult + * @constructor + * @param {google.cloud.dataform.v1beta1.ICompilationResult=} [properties] Properties to set + */ + function CompilationResult(properties) { + this.compilationErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationResult name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.name = ""; + + /** + * CompilationResult gitCommitish. + * @member {string|null|undefined} gitCommitish + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.gitCommitish = null; + + /** + * CompilationResult workspace. + * @member {string|null|undefined} workspace + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.workspace = null; + + /** + * CompilationResult codeCompilationConfig. + * @member {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig|null|undefined} codeCompilationConfig + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.codeCompilationConfig = null; + + /** + * CompilationResult dataformCoreVersion. + * @member {string} dataformCoreVersion + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.dataformCoreVersion = ""; + + /** + * CompilationResult compilationErrors. + * @member {Array.} compilationErrors + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.compilationErrors = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompilationResult source. + * @member {"gitCommitish"|"workspace"|undefined} source + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + Object.defineProperty(CompilationResult.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gitCommitish", "workspace"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompilationResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResult=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResult} CompilationResult instance + */ + CompilationResult.create = function create(properties) { + return new CompilationResult(properties); + }; + + /** + * Encodes the specified CompilationResult message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResult} message CompilationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.gitCommitish != null && Object.hasOwnProperty.call(message, "gitCommitish")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gitCommitish); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workspace); + if (message.codeCompilationConfig != null && Object.hasOwnProperty.call(message, "codeCompilationConfig")) + $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.encode(message.codeCompilationConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dataformCoreVersion != null && Object.hasOwnProperty.call(message, "dataformCoreVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataformCoreVersion); + if (message.compilationErrors != null && message.compilationErrors.length) + for (var i = 0; i < message.compilationErrors.length; ++i) + $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.encode(message.compilationErrors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationResult message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResult} message CompilationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResult} CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.gitCommitish = reader.string(); + break; + } + case 3: { + message.workspace = reader.string(); + break; + } + case 4: { + message.codeCompilationConfig = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.dataformCoreVersion = reader.string(); + break; + } + case 6: { + if (!(message.compilationErrors && message.compilationErrors.length)) + message.compilationErrors = []; + message.compilationErrors.push($root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResult} CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationResult message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.gitCommitish != null && message.hasOwnProperty("gitCommitish")) { + properties.source = 1; + if (!$util.isString(message.gitCommitish)) + return "gitCommitish: string expected"; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + } + if (message.codeCompilationConfig != null && message.hasOwnProperty("codeCompilationConfig")) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify(message.codeCompilationConfig); + if (error) + return "codeCompilationConfig." + error; + } + if (message.dataformCoreVersion != null && message.hasOwnProperty("dataformCoreVersion")) + if (!$util.isString(message.dataformCoreVersion)) + return "dataformCoreVersion: string expected"; + if (message.compilationErrors != null && message.hasOwnProperty("compilationErrors")) { + if (!Array.isArray(message.compilationErrors)) + return "compilationErrors: array expected"; + for (var i = 0; i < message.compilationErrors.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify(message.compilationErrors[i]); + if (error) + return "compilationErrors." + error; + } + } + return null; + }; + + /** + * Creates a CompilationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResult} CompilationResult + */ + CompilationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResult) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResult(); + if (object.name != null) + message.name = String(object.name); + if (object.gitCommitish != null) + message.gitCommitish = String(object.gitCommitish); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.codeCompilationConfig != null) { + if (typeof object.codeCompilationConfig !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.codeCompilationConfig: object expected"); + message.codeCompilationConfig = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.fromObject(object.codeCompilationConfig); + } + if (object.dataformCoreVersion != null) + message.dataformCoreVersion = String(object.dataformCoreVersion); + if (object.compilationErrors) { + if (!Array.isArray(object.compilationErrors)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.compilationErrors: array expected"); + message.compilationErrors = []; + for (var i = 0; i < object.compilationErrors.length; ++i) { + if (typeof object.compilationErrors[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.compilationErrors: object expected"); + message.compilationErrors[i] = $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.fromObject(object.compilationErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompilationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult} message CompilationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compilationErrors = []; + if (options.defaults) { + object.name = ""; + object.codeCompilationConfig = null; + object.dataformCoreVersion = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gitCommitish != null && message.hasOwnProperty("gitCommitish")) { + object.gitCommitish = message.gitCommitish; + if (options.oneofs) + object.source = "gitCommitish"; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) { + object.workspace = message.workspace; + if (options.oneofs) + object.source = "workspace"; + } + if (message.codeCompilationConfig != null && message.hasOwnProperty("codeCompilationConfig")) + object.codeCompilationConfig = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.toObject(message.codeCompilationConfig, options); + if (message.dataformCoreVersion != null && message.hasOwnProperty("dataformCoreVersion")) + object.dataformCoreVersion = message.dataformCoreVersion; + if (message.compilationErrors && message.compilationErrors.length) { + object.compilationErrors = []; + for (var j = 0; j < message.compilationErrors.length; ++j) + object.compilationErrors[j] = $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.toObject(message.compilationErrors[j], options); + } + return object; + }; + + /** + * Converts this CompilationResult to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + * @returns {Object.} JSON object + */ + CompilationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompilationResult + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompilationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResult"; + }; + + CompilationResult.CodeCompilationConfig = (function() { + + /** + * Properties of a CodeCompilationConfig. + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @interface ICodeCompilationConfig + * @property {string|null} [defaultDatabase] CodeCompilationConfig defaultDatabase + * @property {string|null} [defaultSchema] CodeCompilationConfig defaultSchema + * @property {string|null} [defaultLocation] CodeCompilationConfig defaultLocation + * @property {string|null} [assertionSchema] CodeCompilationConfig assertionSchema + * @property {Object.|null} [vars] CodeCompilationConfig vars + * @property {string|null} [databaseSuffix] CodeCompilationConfig databaseSuffix + * @property {string|null} [schemaSuffix] CodeCompilationConfig schemaSuffix + * @property {string|null} [tablePrefix] CodeCompilationConfig tablePrefix + */ + + /** + * Constructs a new CodeCompilationConfig. + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @classdesc Represents a CodeCompilationConfig. + * @implements ICodeCompilationConfig + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig=} [properties] Properties to set + */ + function CodeCompilationConfig(properties) { + this.vars = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CodeCompilationConfig defaultDatabase. + * @member {string} defaultDatabase + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultDatabase = ""; + + /** + * CodeCompilationConfig defaultSchema. + * @member {string} defaultSchema + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultSchema = ""; + + /** + * CodeCompilationConfig defaultLocation. + * @member {string} defaultLocation + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultLocation = ""; + + /** + * CodeCompilationConfig assertionSchema. + * @member {string} assertionSchema + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.assertionSchema = ""; + + /** + * CodeCompilationConfig vars. + * @member {Object.} vars + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.vars = $util.emptyObject; + + /** + * CodeCompilationConfig databaseSuffix. + * @member {string} databaseSuffix + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.databaseSuffix = ""; + + /** + * CodeCompilationConfig schemaSuffix. + * @member {string} schemaSuffix + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.schemaSuffix = ""; + + /** + * CodeCompilationConfig tablePrefix. + * @member {string} tablePrefix + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.tablePrefix = ""; + + /** + * Creates a new CodeCompilationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} CodeCompilationConfig instance + */ + CodeCompilationConfig.create = function create(properties) { + return new CodeCompilationConfig(properties); + }; + + /** + * Encodes the specified CodeCompilationConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig} message CodeCompilationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CodeCompilationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaultDatabase != null && Object.hasOwnProperty.call(message, "defaultDatabase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultDatabase); + if (message.defaultSchema != null && Object.hasOwnProperty.call(message, "defaultSchema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultSchema); + if (message.assertionSchema != null && Object.hasOwnProperty.call(message, "assertionSchema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.assertionSchema); + if (message.vars != null && Object.hasOwnProperty.call(message, "vars")) + for (var keys = Object.keys(message.vars), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.vars[keys[i]]).ldelim(); + if (message.databaseSuffix != null && Object.hasOwnProperty.call(message, "databaseSuffix")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.databaseSuffix); + if (message.schemaSuffix != null && Object.hasOwnProperty.call(message, "schemaSuffix")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.schemaSuffix); + if (message.tablePrefix != null && Object.hasOwnProperty.call(message, "tablePrefix")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.tablePrefix); + if (message.defaultLocation != null && Object.hasOwnProperty.call(message, "defaultLocation")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.defaultLocation); + return writer; + }; + + /** + * Encodes the specified CodeCompilationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig} message CodeCompilationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CodeCompilationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CodeCompilationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.defaultDatabase = reader.string(); + break; + } + case 2: { + message.defaultSchema = reader.string(); + break; + } + case 8: { + message.defaultLocation = reader.string(); + break; + } + case 3: { + message.assertionSchema = reader.string(); + break; + } + case 4: { + if (message.vars === $util.emptyObject) + message.vars = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.vars[key] = value; + break; + } + case 5: { + message.databaseSuffix = reader.string(); + break; + } + case 6: { + message.schemaSuffix = reader.string(); + break; + } + case 7: { + message.tablePrefix = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CodeCompilationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CodeCompilationConfig message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CodeCompilationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + if (!$util.isString(message.defaultDatabase)) + return "defaultDatabase: string expected"; + if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema")) + if (!$util.isString(message.defaultSchema)) + return "defaultSchema: string expected"; + if (message.defaultLocation != null && message.hasOwnProperty("defaultLocation")) + if (!$util.isString(message.defaultLocation)) + return "defaultLocation: string expected"; + if (message.assertionSchema != null && message.hasOwnProperty("assertionSchema")) + if (!$util.isString(message.assertionSchema)) + return "assertionSchema: string expected"; + if (message.vars != null && message.hasOwnProperty("vars")) { + if (!$util.isObject(message.vars)) + return "vars: object expected"; + var key = Object.keys(message.vars); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.vars[key[i]])) + return "vars: string{k:string} expected"; + } + if (message.databaseSuffix != null && message.hasOwnProperty("databaseSuffix")) + if (!$util.isString(message.databaseSuffix)) + return "databaseSuffix: string expected"; + if (message.schemaSuffix != null && message.hasOwnProperty("schemaSuffix")) + if (!$util.isString(message.schemaSuffix)) + return "schemaSuffix: string expected"; + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + if (!$util.isString(message.tablePrefix)) + return "tablePrefix: string expected"; + return null; + }; + + /** + * Creates a CodeCompilationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + */ + CodeCompilationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig(); + if (object.defaultDatabase != null) + message.defaultDatabase = String(object.defaultDatabase); + if (object.defaultSchema != null) + message.defaultSchema = String(object.defaultSchema); + if (object.defaultLocation != null) + message.defaultLocation = String(object.defaultLocation); + if (object.assertionSchema != null) + message.assertionSchema = String(object.assertionSchema); + if (object.vars) { + if (typeof object.vars !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.vars: object expected"); + message.vars = {}; + for (var keys = Object.keys(object.vars), i = 0; i < keys.length; ++i) + message.vars[keys[i]] = String(object.vars[keys[i]]); + } + if (object.databaseSuffix != null) + message.databaseSuffix = String(object.databaseSuffix); + if (object.schemaSuffix != null) + message.schemaSuffix = String(object.schemaSuffix); + if (object.tablePrefix != null) + message.tablePrefix = String(object.tablePrefix); + return message; + }; + + /** + * Creates a plain object from a CodeCompilationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} message CodeCompilationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CodeCompilationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.vars = {}; + if (options.defaults) { + object.defaultDatabase = ""; + object.defaultSchema = ""; + object.assertionSchema = ""; + object.databaseSuffix = ""; + object.schemaSuffix = ""; + object.tablePrefix = ""; + object.defaultLocation = ""; + } + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + object.defaultDatabase = message.defaultDatabase; + if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema")) + object.defaultSchema = message.defaultSchema; + if (message.assertionSchema != null && message.hasOwnProperty("assertionSchema")) + object.assertionSchema = message.assertionSchema; + var keys2; + if (message.vars && (keys2 = Object.keys(message.vars)).length) { + object.vars = {}; + for (var j = 0; j < keys2.length; ++j) + object.vars[keys2[j]] = message.vars[keys2[j]]; + } + if (message.databaseSuffix != null && message.hasOwnProperty("databaseSuffix")) + object.databaseSuffix = message.databaseSuffix; + if (message.schemaSuffix != null && message.hasOwnProperty("schemaSuffix")) + object.schemaSuffix = message.schemaSuffix; + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + object.tablePrefix = message.tablePrefix; + if (message.defaultLocation != null && message.hasOwnProperty("defaultLocation")) + object.defaultLocation = message.defaultLocation; + return object; + }; + + /** + * Converts this CodeCompilationConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + * @returns {Object.} JSON object + */ + CodeCompilationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CodeCompilationConfig + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CodeCompilationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig"; + }; + + return CodeCompilationConfig; + })(); + + CompilationResult.CompilationError = (function() { + + /** + * Properties of a CompilationError. + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @interface ICompilationError + * @property {string|null} [message] CompilationError message + * @property {string|null} [stack] CompilationError stack + * @property {string|null} [path] CompilationError path + * @property {google.cloud.dataform.v1beta1.ITarget|null} [actionTarget] CompilationError actionTarget + */ + + /** + * Constructs a new CompilationError. + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @classdesc Represents a CompilationError. + * @implements ICompilationError + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICompilationError=} [properties] Properties to set + */ + function CompilationError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationError message. + * @member {string} message + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.message = ""; + + /** + * CompilationError stack. + * @member {string} stack + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.stack = ""; + + /** + * CompilationError path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.path = ""; + + /** + * CompilationError actionTarget. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} actionTarget + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.actionTarget = null; + + /** + * Creates a new CompilationError instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICompilationError=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} CompilationError instance + */ + CompilationError.create = function create(properties) { + return new CompilationError(properties); + }; + + /** + * Encodes the specified CompilationError message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICompilationError} message CompilationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.stack != null && Object.hasOwnProperty.call(message, "stack")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stack); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); + if (message.actionTarget != null && Object.hasOwnProperty.call(message, "actionTarget")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.actionTarget, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationError message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICompilationError} message CompilationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationError message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.stack = reader.string(); + break; + } + case 3: { + message.path = reader.string(); + break; + } + case 4: { + message.actionTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationError message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.stack != null && message.hasOwnProperty("stack")) + if (!$util.isString(message.stack)) + return "stack: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.actionTarget != null && message.hasOwnProperty("actionTarget")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.actionTarget); + if (error) + return "actionTarget." + error; + } + return null; + }; + + /** + * Creates a CompilationError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} CompilationError + */ + CompilationError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError(); + if (object.message != null) + message.message = String(object.message); + if (object.stack != null) + message.stack = String(object.stack); + if (object.path != null) + message.path = String(object.path); + if (object.actionTarget != null) { + if (typeof object.actionTarget !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.CompilationError.actionTarget: object expected"); + message.actionTarget = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.actionTarget); + } + return message; + }; + + /** + * Creates a plain object from a CompilationError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} message CompilationError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.stack = ""; + object.path = ""; + object.actionTarget = null; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.stack != null && message.hasOwnProperty("stack")) + object.stack = message.stack; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.actionTarget != null && message.hasOwnProperty("actionTarget")) + object.actionTarget = $root.google.cloud.dataform.v1beta1.Target.toObject(message.actionTarget, options); + return object; + }; + + /** + * Converts this CompilationError to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + * @returns {Object.} JSON object + */ + CompilationError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompilationError + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompilationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResult.CompilationError"; + }; + + return CompilationError; + })(); + + return CompilationResult; + })(); + + v1beta1.ListCompilationResultsRequest = (function() { + + /** + * Properties of a ListCompilationResultsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListCompilationResultsRequest + * @property {string|null} [parent] ListCompilationResultsRequest parent + * @property {number|null} [pageSize] ListCompilationResultsRequest pageSize + * @property {string|null} [pageToken] ListCompilationResultsRequest pageToken + */ + + /** + * Constructs a new ListCompilationResultsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListCompilationResultsRequest. + * @implements IListCompilationResultsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest=} [properties] Properties to set + */ + function ListCompilationResultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCompilationResultsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.parent = ""; + + /** + * ListCompilationResultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.pageSize = 0; + + /** + * ListCompilationResultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListCompilationResultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} ListCompilationResultsRequest instance + */ + ListCompilationResultsRequest.create = function create(properties) { + return new ListCompilationResultsRequest(properties); + }; + + /** + * Encodes the specified ListCompilationResultsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest} message ListCompilationResultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListCompilationResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest} message ListCompilationResultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListCompilationResultsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCompilationResultsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCompilationResultsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListCompilationResultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} ListCompilationResultsRequest + */ + ListCompilationResultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListCompilationResultsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListCompilationResultsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListCompilationResultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} message ListCompilationResultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCompilationResultsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListCompilationResultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCompilationResultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCompilationResultsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCompilationResultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListCompilationResultsRequest"; + }; + + return ListCompilationResultsRequest; + })(); + + v1beta1.ListCompilationResultsResponse = (function() { + + /** + * Properties of a ListCompilationResultsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListCompilationResultsResponse + * @property {Array.|null} [compilationResults] ListCompilationResultsResponse compilationResults + * @property {string|null} [nextPageToken] ListCompilationResultsResponse nextPageToken + * @property {Array.|null} [unreachable] ListCompilationResultsResponse unreachable + */ + + /** + * Constructs a new ListCompilationResultsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListCompilationResultsResponse. + * @implements IListCompilationResultsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsResponse=} [properties] Properties to set + */ + function ListCompilationResultsResponse(properties) { + this.compilationResults = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCompilationResultsResponse compilationResults. + * @member {Array.} compilationResults + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.compilationResults = $util.emptyArray; + + /** + * ListCompilationResultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.nextPageToken = ""; + + /** + * ListCompilationResultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCompilationResultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} ListCompilationResultsResponse instance + */ + ListCompilationResultsResponse.create = function create(properties) { + return new ListCompilationResultsResponse(properties); + }; + + /** + * Encodes the specified ListCompilationResultsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsResponse} message ListCompilationResultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compilationResults != null && message.compilationResults.length) + for (var i = 0; i < message.compilationResults.length; ++i) + $root.google.cloud.dataform.v1beta1.CompilationResult.encode(message.compilationResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListCompilationResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsResponse} message ListCompilationResultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListCompilationResultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.compilationResults && message.compilationResults.length)) + message.compilationResults = []; + message.compilationResults.push($root.google.cloud.dataform.v1beta1.CompilationResult.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCompilationResultsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCompilationResultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compilationResults != null && message.hasOwnProperty("compilationResults")) { + if (!Array.isArray(message.compilationResults)) + return "compilationResults: array expected"; + for (var i = 0; i < message.compilationResults.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResult.verify(message.compilationResults[i]); + if (error) + return "compilationResults." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListCompilationResultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} ListCompilationResultsResponse + */ + ListCompilationResultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListCompilationResultsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListCompilationResultsResponse(); + if (object.compilationResults) { + if (!Array.isArray(object.compilationResults)) + throw TypeError(".google.cloud.dataform.v1beta1.ListCompilationResultsResponse.compilationResults: array expected"); + message.compilationResults = []; + for (var i = 0; i < object.compilationResults.length; ++i) { + if (typeof object.compilationResults[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.ListCompilationResultsResponse.compilationResults: object expected"); + message.compilationResults[i] = $root.google.cloud.dataform.v1beta1.CompilationResult.fromObject(object.compilationResults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1beta1.ListCompilationResultsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListCompilationResultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} message ListCompilationResultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCompilationResultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.compilationResults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.compilationResults && message.compilationResults.length) { + object.compilationResults = []; + for (var j = 0; j < message.compilationResults.length; ++j) + object.compilationResults[j] = $root.google.cloud.dataform.v1beta1.CompilationResult.toObject(message.compilationResults[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListCompilationResultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCompilationResultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCompilationResultsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCompilationResultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListCompilationResultsResponse"; + }; + + return ListCompilationResultsResponse; + })(); + + v1beta1.GetCompilationResultRequest = (function() { + + /** + * Properties of a GetCompilationResultRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IGetCompilationResultRequest + * @property {string|null} [name] GetCompilationResultRequest name + */ + + /** + * Constructs a new GetCompilationResultRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a GetCompilationResultRequest. + * @implements IGetCompilationResultRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest=} [properties] Properties to set + */ + function GetCompilationResultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCompilationResultRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @instance + */ + GetCompilationResultRequest.prototype.name = ""; + + /** + * Creates a new GetCompilationResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.GetCompilationResultRequest} GetCompilationResultRequest instance + */ + GetCompilationResultRequest.create = function create(properties) { + return new GetCompilationResultRequest(properties); + }; + + /** + * Encodes the specified GetCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetCompilationResultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest} message GetCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCompilationResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetCompilationResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest} message GetCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCompilationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.GetCompilationResultRequest} GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCompilationResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.GetCompilationResultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.GetCompilationResultRequest} GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCompilationResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCompilationResultRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCompilationResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.GetCompilationResultRequest} GetCompilationResultRequest + */ + GetCompilationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.GetCompilationResultRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.GetCompilationResultRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCompilationResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.GetCompilationResultRequest} message GetCompilationResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCompilationResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetCompilationResultRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @instance + * @returns {Object.} JSON object + */ + GetCompilationResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetCompilationResultRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCompilationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.GetCompilationResultRequest"; + }; + + return GetCompilationResultRequest; + })(); + + v1beta1.CreateCompilationResultRequest = (function() { + + /** + * Properties of a CreateCompilationResultRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICreateCompilationResultRequest + * @property {string|null} [parent] CreateCompilationResultRequest parent + * @property {google.cloud.dataform.v1beta1.ICompilationResult|null} [compilationResult] CreateCompilationResultRequest compilationResult + */ + + /** + * Constructs a new CreateCompilationResultRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CreateCompilationResultRequest. + * @implements ICreateCompilationResultRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest=} [properties] Properties to set + */ + function CreateCompilationResultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCompilationResultRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @instance + */ + CreateCompilationResultRequest.prototype.parent = ""; + + /** + * CreateCompilationResultRequest compilationResult. + * @member {google.cloud.dataform.v1beta1.ICompilationResult|null|undefined} compilationResult + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @instance + */ + CreateCompilationResultRequest.prototype.compilationResult = null; + + /** + * Creates a new CreateCompilationResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} CreateCompilationResultRequest instance + */ + CreateCompilationResultRequest.create = function create(properties) { + return new CreateCompilationResultRequest(properties); + }; + + /** + * Encodes the specified CreateCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateCompilationResultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest} message CreateCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCompilationResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.compilationResult != null && Object.hasOwnProperty.call(message, "compilationResult")) + $root.google.cloud.dataform.v1beta1.CompilationResult.encode(message.compilationResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateCompilationResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest} message CreateCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCompilationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCompilationResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CreateCompilationResultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.compilationResult = $root.google.cloud.dataform.v1beta1.CompilationResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCompilationResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCompilationResultRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCompilationResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResult.verify(message.compilationResult); + if (error) + return "compilationResult." + error; + } + return null; + }; + + /** + * Creates a CreateCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} CreateCompilationResultRequest + */ + CreateCompilationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CreateCompilationResultRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CreateCompilationResultRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.compilationResult != null) { + if (typeof object.compilationResult !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CreateCompilationResultRequest.compilationResult: object expected"); + message.compilationResult = $root.google.cloud.dataform.v1beta1.CompilationResult.fromObject(object.compilationResult); + } + return message; + }; + + /** + * Creates a plain object from a CreateCompilationResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} message CreateCompilationResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCompilationResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.compilationResult = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + object.compilationResult = $root.google.cloud.dataform.v1beta1.CompilationResult.toObject(message.compilationResult, options); + return object; + }; + + /** + * Converts this CreateCompilationResultRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCompilationResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCompilationResultRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCompilationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CreateCompilationResultRequest"; + }; + + return CreateCompilationResultRequest; + })(); + + v1beta1.Target = (function() { + + /** + * Properties of a Target. + * @memberof google.cloud.dataform.v1beta1 + * @interface ITarget + * @property {string|null} [database] Target database + * @property {string|null} [schema] Target schema + * @property {string|null} [name] Target name + */ + + /** + * Constructs a new Target. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a Target. + * @implements ITarget + * @constructor + * @param {google.cloud.dataform.v1beta1.ITarget=} [properties] Properties to set + */ + function Target(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Target database. + * @member {string} database + * @memberof google.cloud.dataform.v1beta1.Target + * @instance + */ + Target.prototype.database = ""; + + /** + * Target schema. + * @member {string} schema + * @memberof google.cloud.dataform.v1beta1.Target + * @instance + */ + Target.prototype.schema = ""; + + /** + * Target name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.Target + * @instance + */ + Target.prototype.name = ""; + + /** + * Creates a new Target instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {google.cloud.dataform.v1beta1.ITarget=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.Target} Target instance + */ + Target.create = function create(properties) { + return new Target(properties); + }; + + /** + * Encodes the specified Target message. Does not implicitly {@link google.cloud.dataform.v1beta1.Target.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {google.cloud.dataform.v1beta1.ITarget} message Target message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Target.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schema); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Target.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {google.cloud.dataform.v1beta1.ITarget} message Target message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Target.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Target message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.Target} Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Target.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.Target(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.database = reader.string(); + break; + } + case 2: { + message.schema = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Target message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.Target} Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Target.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Target message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Target.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Target message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.Target} Target + */ + Target.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.Target) + return object; + var message = new $root.google.cloud.dataform.v1beta1.Target(); + if (object.database != null) + message.database = String(object.database); + if (object.schema != null) + message.schema = String(object.schema); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {google.cloud.dataform.v1beta1.Target} message Target + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Target.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.database = ""; + object.schema = ""; + object.name = ""; + } + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Target to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.Target + * @instance + * @returns {Object.} JSON object + */ + Target.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Target + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Target.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.Target"; + }; + + return Target; + })(); + + v1beta1.RelationDescriptor = (function() { + + /** + * Properties of a RelationDescriptor. + * @memberof google.cloud.dataform.v1beta1 + * @interface IRelationDescriptor + * @property {string|null} [description] RelationDescriptor description + * @property {Array.|null} [columns] RelationDescriptor columns + * @property {Object.|null} [bigqueryLabels] RelationDescriptor bigqueryLabels + */ + + /** + * Constructs a new RelationDescriptor. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a RelationDescriptor. + * @implements IRelationDescriptor + * @constructor + * @param {google.cloud.dataform.v1beta1.IRelationDescriptor=} [properties] Properties to set + */ + function RelationDescriptor(properties) { + this.columns = []; + this.bigqueryLabels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RelationDescriptor description. + * @member {string} description + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.description = ""; + + /** + * RelationDescriptor columns. + * @member {Array.} columns + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.columns = $util.emptyArray; + + /** + * RelationDescriptor bigqueryLabels. + * @member {Object.} bigqueryLabels + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.bigqueryLabels = $util.emptyObject; + + /** + * Creates a new RelationDescriptor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.IRelationDescriptor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor} RelationDescriptor instance + */ + RelationDescriptor.create = function create(properties) { + return new RelationDescriptor(properties); + }; + + /** + * Encodes the specified RelationDescriptor message. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.IRelationDescriptor} message RelationDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RelationDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bigqueryLabels != null && Object.hasOwnProperty.call(message, "bigqueryLabels")) + for (var keys = Object.keys(message.bigqueryLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.bigqueryLabels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified RelationDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.IRelationDescriptor} message RelationDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RelationDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor} RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RelationDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.RelationDescriptor(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.decode(reader, reader.uint32())); + break; + } + case 3: { + if (message.bigqueryLabels === $util.emptyObject) + message.bigqueryLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.bigqueryLabels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor} RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RelationDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RelationDescriptor message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RelationDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + if (message.bigqueryLabels != null && message.hasOwnProperty("bigqueryLabels")) { + if (!$util.isObject(message.bigqueryLabels)) + return "bigqueryLabels: object expected"; + var key = Object.keys(message.bigqueryLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.bigqueryLabels[key[i]])) + return "bigqueryLabels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a RelationDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor} RelationDescriptor + */ + RelationDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.RelationDescriptor) + return object; + var message = new $root.google.cloud.dataform.v1beta1.RelationDescriptor(); + if (object.description != null) + message.description = String(object.description); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.columns: object expected"); + message.columns[i] = $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.fromObject(object.columns[i]); + } + } + if (object.bigqueryLabels) { + if (typeof object.bigqueryLabels !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.bigqueryLabels: object expected"); + message.bigqueryLabels = {}; + for (var keys = Object.keys(object.bigqueryLabels), i = 0; i < keys.length; ++i) + message.bigqueryLabels[keys[i]] = String(object.bigqueryLabels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a RelationDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor} message RelationDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RelationDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (options.objects || options.defaults) + object.bigqueryLabels = {}; + if (options.defaults) + object.description = ""; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.toObject(message.columns[j], options); + } + var keys2; + if (message.bigqueryLabels && (keys2 = Object.keys(message.bigqueryLabels)).length) { + object.bigqueryLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.bigqueryLabels[keys2[j]] = message.bigqueryLabels[keys2[j]]; + } + return object; + }; + + /** + * Converts this RelationDescriptor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @instance + * @returns {Object.} JSON object + */ + RelationDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RelationDescriptor + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RelationDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.RelationDescriptor"; + }; + + RelationDescriptor.ColumnDescriptor = (function() { + + /** + * Properties of a ColumnDescriptor. + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @interface IColumnDescriptor + * @property {Array.|null} [path] ColumnDescriptor path + * @property {string|null} [description] ColumnDescriptor description + * @property {Array.|null} [bigqueryPolicyTags] ColumnDescriptor bigqueryPolicyTags + */ + + /** + * Constructs a new ColumnDescriptor. + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @classdesc Represents a ColumnDescriptor. + * @implements IColumnDescriptor + * @constructor + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor=} [properties] Properties to set + */ + function ColumnDescriptor(properties) { + this.path = []; + this.bigqueryPolicyTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnDescriptor path. + * @member {Array.} path + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.path = $util.emptyArray; + + /** + * ColumnDescriptor description. + * @member {string} description + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.description = ""; + + /** + * ColumnDescriptor bigqueryPolicyTags. + * @member {Array.} bigqueryPolicyTags + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.bigqueryPolicyTags = $util.emptyArray; + + /** + * Creates a new ColumnDescriptor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} ColumnDescriptor instance + */ + ColumnDescriptor.create = function create(properties) { + return new ColumnDescriptor(properties); + }; + + /** + * Encodes the specified ColumnDescriptor message. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor} message ColumnDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) + for (var i = 0; i < message.path.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path[i]); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.bigqueryPolicyTags != null && message.bigqueryPolicyTags.length) + for (var i = 0; i < message.bigqueryPolicyTags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.bigqueryPolicyTags[i]); + return writer; + }; + + /** + * Encodes the specified ColumnDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor} message ColumnDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.string()); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + if (!(message.bigqueryPolicyTags && message.bigqueryPolicyTags.length)) + message.bigqueryPolicyTags = []; + message.bigqueryPolicyTags.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnDescriptor message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isString(message.path[i])) + return "path: string[] expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.bigqueryPolicyTags != null && message.hasOwnProperty("bigqueryPolicyTags")) { + if (!Array.isArray(message.bigqueryPolicyTags)) + return "bigqueryPolicyTags: array expected"; + for (var i = 0; i < message.bigqueryPolicyTags.length; ++i) + if (!$util.isString(message.bigqueryPolicyTags[i])) + return "bigqueryPolicyTags: string[] expected"; + } + return null; + }; + + /** + * Creates a ColumnDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + */ + ColumnDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor) + return object; + var message = new $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = String(object.path[i]); + } + if (object.description != null) + message.description = String(object.description); + if (object.bigqueryPolicyTags) { + if (!Array.isArray(object.bigqueryPolicyTags)) + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.bigqueryPolicyTags: array expected"); + message.bigqueryPolicyTags = []; + for (var i = 0; i < object.bigqueryPolicyTags.length; ++i) + message.bigqueryPolicyTags[i] = String(object.bigqueryPolicyTags[i]); + } + return message; + }; + + /** + * Creates a plain object from a ColumnDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} message ColumnDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.bigqueryPolicyTags = []; + } + if (options.defaults) + object.description = ""; + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.bigqueryPolicyTags && message.bigqueryPolicyTags.length) { + object.bigqueryPolicyTags = []; + for (var j = 0; j < message.bigqueryPolicyTags.length; ++j) + object.bigqueryPolicyTags[j] = message.bigqueryPolicyTags[j]; + } + return object; + }; + + /** + * Converts this ColumnDescriptor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @instance + * @returns {Object.} JSON object + */ + ColumnDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ColumnDescriptor + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ColumnDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor"; + }; + + return ColumnDescriptor; + })(); + + return RelationDescriptor; + })(); + + v1beta1.CompilationResultAction = (function() { + + /** + * Properties of a CompilationResultAction. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICompilationResultAction + * @property {google.cloud.dataform.v1beta1.ITarget|null} [target] CompilationResultAction target + * @property {google.cloud.dataform.v1beta1.ITarget|null} [canonicalTarget] CompilationResultAction canonicalTarget + * @property {string|null} [filePath] CompilationResultAction filePath + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation|null} [relation] CompilationResultAction relation + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations|null} [operations] CompilationResultAction operations + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion|null} [assertion] CompilationResultAction assertion + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration|null} [declaration] CompilationResultAction declaration + */ + + /** + * Constructs a new CompilationResultAction. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CompilationResultAction. + * @implements ICompilationResultAction + * @constructor + * @param {google.cloud.dataform.v1beta1.ICompilationResultAction=} [properties] Properties to set + */ + function CompilationResultAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationResultAction target. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} target + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.target = null; + + /** + * CompilationResultAction canonicalTarget. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} canonicalTarget + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.canonicalTarget = null; + + /** + * CompilationResultAction filePath. + * @member {string} filePath + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.filePath = ""; + + /** + * CompilationResultAction relation. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation|null|undefined} relation + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.relation = null; + + /** + * CompilationResultAction operations. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations|null|undefined} operations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.operations = null; + + /** + * CompilationResultAction assertion. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion|null|undefined} assertion + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.assertion = null; + + /** + * CompilationResultAction declaration. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration|null|undefined} declaration + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.declaration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompilationResultAction compiledObject. + * @member {"relation"|"operations"|"assertion"|"declaration"|undefined} compiledObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + Object.defineProperty(CompilationResultAction.prototype, "compiledObject", { + get: $util.oneOfGetter($oneOfFields = ["relation", "operations", "assertion", "declaration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompilationResultAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResultAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction} CompilationResultAction instance + */ + CompilationResultAction.create = function create(properties) { + return new CompilationResultAction(properties); + }; + + /** + * Encodes the specified CompilationResultAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResultAction} message CompilationResultAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResultAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.canonicalTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filePath != null && Object.hasOwnProperty.call(message, "filePath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filePath); + if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.encode(message.relation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.operations != null && Object.hasOwnProperty.call(message, "operations")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.encode(message.operations, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.assertion != null && Object.hasOwnProperty.call(message, "assertion")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.encode(message.assertion, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.declaration != null && Object.hasOwnProperty.call(message, "declaration")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.encode(message.declaration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationResultAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResultAction} message CompilationResultAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResultAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction} CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResultAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.target = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + } + case 2: { + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + } + case 3: { + message.filePath = reader.string(); + break; + } + case 4: { + message.relation = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.decode(reader, reader.uint32()); + break; + } + case 5: { + message.operations = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.decode(reader, reader.uint32()); + break; + } + case 6: { + message.assertion = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.decode(reader, reader.uint32()); + break; + } + case 7: { + message.declaration = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction} CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResultAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationResultAction message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationResultAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.canonicalTarget); + if (error) + return "canonicalTarget." + error; + } + if (message.filePath != null && message.hasOwnProperty("filePath")) + if (!$util.isString(message.filePath)) + return "filePath: string expected"; + if (message.relation != null && message.hasOwnProperty("relation")) { + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify(message.relation); + if (error) + return "relation." + error; + } + } + if (message.operations != null && message.hasOwnProperty("operations")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify(message.operations); + if (error) + return "operations." + error; + } + } + if (message.assertion != null && message.hasOwnProperty("assertion")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify(message.assertion); + if (error) + return "assertion." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify(message.declaration); + if (error) + return "declaration." + error; + } + } + return null; + }; + + /** + * Creates a CompilationResultAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction} CompilationResultAction + */ + CompilationResultAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction(); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.target: object expected"); + message.target = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.target); + } + if (object.canonicalTarget != null) { + if (typeof object.canonicalTarget !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.canonicalTarget: object expected"); + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.canonicalTarget); + } + if (object.filePath != null) + message.filePath = String(object.filePath); + if (object.relation != null) { + if (typeof object.relation !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.relation: object expected"); + message.relation = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.fromObject(object.relation); + } + if (object.operations != null) { + if (typeof object.operations !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.operations: object expected"); + message.operations = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.fromObject(object.operations); + } + if (object.assertion != null) { + if (typeof object.assertion !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.assertion: object expected"); + message.assertion = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.fromObject(object.assertion); + } + if (object.declaration != null) { + if (typeof object.declaration !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.declaration: object expected"); + message.declaration = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.fromObject(object.declaration); + } + return message; + }; + + /** + * Creates a plain object from a CompilationResultAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction} message CompilationResultAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationResultAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = null; + object.canonicalTarget = null; + object.filePath = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.dataform.v1beta1.Target.toObject(message.target, options); + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) + object.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.toObject(message.canonicalTarget, options); + if (message.filePath != null && message.hasOwnProperty("filePath")) + object.filePath = message.filePath; + if (message.relation != null && message.hasOwnProperty("relation")) { + object.relation = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.toObject(message.relation, options); + if (options.oneofs) + object.compiledObject = "relation"; + } + if (message.operations != null && message.hasOwnProperty("operations")) { + object.operations = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.toObject(message.operations, options); + if (options.oneofs) + object.compiledObject = "operations"; + } + if (message.assertion != null && message.hasOwnProperty("assertion")) { + object.assertion = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.toObject(message.assertion, options); + if (options.oneofs) + object.compiledObject = "assertion"; + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + object.declaration = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.toObject(message.declaration, options); + if (options.oneofs) + object.compiledObject = "declaration"; + } + return object; + }; + + /** + * Converts this CompilationResultAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + * @returns {Object.} JSON object + */ + CompilationResultAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompilationResultAction + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompilationResultAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResultAction"; + }; + + CompilationResultAction.Relation = (function() { + + /** + * Properties of a Relation. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @interface IRelation + * @property {Array.|null} [dependencyTargets] Relation dependencyTargets + * @property {boolean|null} [disabled] Relation disabled + * @property {Array.|null} [tags] Relation tags + * @property {google.cloud.dataform.v1beta1.IRelationDescriptor|null} [relationDescriptor] Relation relationDescriptor + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType|null} [relationType] Relation relationType + * @property {string|null} [selectQuery] Relation selectQuery + * @property {Array.|null} [preOperations] Relation preOperations + * @property {Array.|null} [postOperations] Relation postOperations + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig|null} [incrementalTableConfig] Relation incrementalTableConfig + * @property {string|null} [partitionExpression] Relation partitionExpression + * @property {Array.|null} [clusterExpressions] Relation clusterExpressions + * @property {number|null} [partitionExpirationDays] Relation partitionExpirationDays + * @property {boolean|null} [requirePartitionFilter] Relation requirePartitionFilter + * @property {Object.|null} [additionalOptions] Relation additionalOptions + */ + + /** + * Constructs a new Relation. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @classdesc Represents a Relation. + * @implements IRelation + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation=} [properties] Properties to set + */ + function Relation(properties) { + this.dependencyTargets = []; + this.tags = []; + this.preOperations = []; + this.postOperations = []; + this.clusterExpressions = []; + this.additionalOptions = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Relation dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.dependencyTargets = $util.emptyArray; + + /** + * Relation disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.disabled = false; + + /** + * Relation tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.tags = $util.emptyArray; + + /** + * Relation relationDescriptor. + * @member {google.cloud.dataform.v1beta1.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.relationDescriptor = null; + + /** + * Relation relationType. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType} relationType + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.relationType = 0; + + /** + * Relation selectQuery. + * @member {string} selectQuery + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.selectQuery = ""; + + /** + * Relation preOperations. + * @member {Array.} preOperations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.preOperations = $util.emptyArray; + + /** + * Relation postOperations. + * @member {Array.} postOperations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.postOperations = $util.emptyArray; + + /** + * Relation incrementalTableConfig. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig|null|undefined} incrementalTableConfig + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.incrementalTableConfig = null; + + /** + * Relation partitionExpression. + * @member {string} partitionExpression + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.partitionExpression = ""; + + /** + * Relation clusterExpressions. + * @member {Array.} clusterExpressions + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.clusterExpressions = $util.emptyArray; + + /** + * Relation partitionExpirationDays. + * @member {number} partitionExpirationDays + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.partitionExpirationDays = 0; + + /** + * Relation requirePartitionFilter. + * @member {boolean} requirePartitionFilter + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.requirePartitionFilter = false; + + /** + * Relation additionalOptions. + * @member {Object.} additionalOptions + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.additionalOptions = $util.emptyObject; + + /** + * Creates a new Relation instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} Relation instance + */ + Relation.create = function create(properties) { + return new Relation(properties); + }; + + /** + * Encodes the specified Relation message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation} message Relation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Relation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1beta1.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.relationType != null && Object.hasOwnProperty.call(message, "relationType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.relationType); + if (message.selectQuery != null && Object.hasOwnProperty.call(message, "selectQuery")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.selectQuery); + if (message.preOperations != null && message.preOperations.length) + for (var i = 0; i < message.preOperations.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.preOperations[i]); + if (message.postOperations != null && message.postOperations.length) + for (var i = 0; i < message.postOperations.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.postOperations[i]); + if (message.incrementalTableConfig != null && Object.hasOwnProperty.call(message, "incrementalTableConfig")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.encode(message.incrementalTableConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.partitionExpression != null && Object.hasOwnProperty.call(message, "partitionExpression")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.partitionExpression); + if (message.clusterExpressions != null && message.clusterExpressions.length) + for (var i = 0; i < message.clusterExpressions.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.clusterExpressions[i]); + if (message.partitionExpirationDays != null && Object.hasOwnProperty.call(message, "partitionExpirationDays")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.partitionExpirationDays); + if (message.requirePartitionFilter != null && Object.hasOwnProperty.call(message, "requirePartitionFilter")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.requirePartitionFilter); + if (message.additionalOptions != null && Object.hasOwnProperty.call(message, "additionalOptions")) + for (var keys = Object.keys(message.additionalOptions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.additionalOptions[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Relation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation} message Relation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Relation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Relation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Relation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + message.disabled = reader.bool(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 4: { + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + } + case 5: { + message.relationType = reader.int32(); + break; + } + case 6: { + message.selectQuery = reader.string(); + break; + } + case 7: { + if (!(message.preOperations && message.preOperations.length)) + message.preOperations = []; + message.preOperations.push(reader.string()); + break; + } + case 8: { + if (!(message.postOperations && message.postOperations.length)) + message.postOperations = []; + message.postOperations.push(reader.string()); + break; + } + case 9: { + message.incrementalTableConfig = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.partitionExpression = reader.string(); + break; + } + case 11: { + if (!(message.clusterExpressions && message.clusterExpressions.length)) + message.clusterExpressions = []; + message.clusterExpressions.push(reader.string()); + break; + } + case 12: { + message.partitionExpirationDays = reader.int32(); + break; + } + case 13: { + message.requirePartitionFilter = reader.bool(); + break; + } + case 14: { + if (message.additionalOptions === $util.emptyObject) + message.additionalOptions = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.additionalOptions[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Relation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Relation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Relation message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Relation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + if (message.relationType != null && message.hasOwnProperty("relationType")) + switch (message.relationType) { + default: + return "relationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + if (!$util.isString(message.selectQuery)) + return "selectQuery: string expected"; + if (message.preOperations != null && message.hasOwnProperty("preOperations")) { + if (!Array.isArray(message.preOperations)) + return "preOperations: array expected"; + for (var i = 0; i < message.preOperations.length; ++i) + if (!$util.isString(message.preOperations[i])) + return "preOperations: string[] expected"; + } + if (message.postOperations != null && message.hasOwnProperty("postOperations")) { + if (!Array.isArray(message.postOperations)) + return "postOperations: array expected"; + for (var i = 0; i < message.postOperations.length; ++i) + if (!$util.isString(message.postOperations[i])) + return "postOperations: string[] expected"; + } + if (message.incrementalTableConfig != null && message.hasOwnProperty("incrementalTableConfig")) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify(message.incrementalTableConfig); + if (error) + return "incrementalTableConfig." + error; + } + if (message.partitionExpression != null && message.hasOwnProperty("partitionExpression")) + if (!$util.isString(message.partitionExpression)) + return "partitionExpression: string expected"; + if (message.clusterExpressions != null && message.hasOwnProperty("clusterExpressions")) { + if (!Array.isArray(message.clusterExpressions)) + return "clusterExpressions: array expected"; + for (var i = 0; i < message.clusterExpressions.length; ++i) + if (!$util.isString(message.clusterExpressions[i])) + return "clusterExpressions: string[] expected"; + } + if (message.partitionExpirationDays != null && message.hasOwnProperty("partitionExpirationDays")) + if (!$util.isInteger(message.partitionExpirationDays)) + return "partitionExpirationDays: integer expected"; + if (message.requirePartitionFilter != null && message.hasOwnProperty("requirePartitionFilter")) + if (typeof message.requirePartitionFilter !== "boolean") + return "requirePartitionFilter: boolean expected"; + if (message.additionalOptions != null && message.hasOwnProperty("additionalOptions")) { + if (!$util.isObject(message.additionalOptions)) + return "additionalOptions: object expected"; + var key = Object.keys(message.additionalOptions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.additionalOptions[key[i]])) + return "additionalOptions: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Relation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} Relation + */ + Relation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); + } + switch (object.relationType) { + default: + if (typeof object.relationType === "number") { + message.relationType = object.relationType; + break; + } + break; + case "RELATION_TYPE_UNSPECIFIED": + case 0: + message.relationType = 0; + break; + case "TABLE": + case 1: + message.relationType = 1; + break; + case "VIEW": + case 2: + message.relationType = 2; + break; + case "INCREMENTAL_TABLE": + case 3: + message.relationType = 3; + break; + case "MATERIALIZED_VIEW": + case 4: + message.relationType = 4; + break; + } + if (object.selectQuery != null) + message.selectQuery = String(object.selectQuery); + if (object.preOperations) { + if (!Array.isArray(object.preOperations)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.preOperations: array expected"); + message.preOperations = []; + for (var i = 0; i < object.preOperations.length; ++i) + message.preOperations[i] = String(object.preOperations[i]); + } + if (object.postOperations) { + if (!Array.isArray(object.postOperations)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.postOperations: array expected"); + message.postOperations = []; + for (var i = 0; i < object.postOperations.length; ++i) + message.postOperations[i] = String(object.postOperations[i]); + } + if (object.incrementalTableConfig != null) { + if (typeof object.incrementalTableConfig !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.incrementalTableConfig: object expected"); + message.incrementalTableConfig = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.fromObject(object.incrementalTableConfig); + } + if (object.partitionExpression != null) + message.partitionExpression = String(object.partitionExpression); + if (object.clusterExpressions) { + if (!Array.isArray(object.clusterExpressions)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.clusterExpressions: array expected"); + message.clusterExpressions = []; + for (var i = 0; i < object.clusterExpressions.length; ++i) + message.clusterExpressions[i] = String(object.clusterExpressions[i]); + } + if (object.partitionExpirationDays != null) + message.partitionExpirationDays = object.partitionExpirationDays | 0; + if (object.requirePartitionFilter != null) + message.requirePartitionFilter = Boolean(object.requirePartitionFilter); + if (object.additionalOptions) { + if (typeof object.additionalOptions !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.additionalOptions: object expected"); + message.additionalOptions = {}; + for (var keys = Object.keys(object.additionalOptions), i = 0; i < keys.length; ++i) + message.additionalOptions[keys[i]] = String(object.additionalOptions[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Relation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} message Relation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Relation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + object.preOperations = []; + object.postOperations = []; + object.clusterExpressions = []; + } + if (options.objects || options.defaults) + object.additionalOptions = {}; + if (options.defaults) { + object.disabled = false; + object.relationDescriptor = null; + object.relationType = options.enums === String ? "RELATION_TYPE_UNSPECIFIED" : 0; + object.selectQuery = ""; + object.incrementalTableConfig = null; + object.partitionExpression = ""; + object.partitionExpirationDays = 0; + object.requirePartitionFilter = false; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1beta1.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); + if (message.relationType != null && message.hasOwnProperty("relationType")) + object.relationType = options.enums === String ? $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType[message.relationType] === undefined ? message.relationType : $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType[message.relationType] : message.relationType; + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + object.selectQuery = message.selectQuery; + if (message.preOperations && message.preOperations.length) { + object.preOperations = []; + for (var j = 0; j < message.preOperations.length; ++j) + object.preOperations[j] = message.preOperations[j]; + } + if (message.postOperations && message.postOperations.length) { + object.postOperations = []; + for (var j = 0; j < message.postOperations.length; ++j) + object.postOperations[j] = message.postOperations[j]; + } + if (message.incrementalTableConfig != null && message.hasOwnProperty("incrementalTableConfig")) + object.incrementalTableConfig = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.toObject(message.incrementalTableConfig, options); + if (message.partitionExpression != null && message.hasOwnProperty("partitionExpression")) + object.partitionExpression = message.partitionExpression; + if (message.clusterExpressions && message.clusterExpressions.length) { + object.clusterExpressions = []; + for (var j = 0; j < message.clusterExpressions.length; ++j) + object.clusterExpressions[j] = message.clusterExpressions[j]; + } + if (message.partitionExpirationDays != null && message.hasOwnProperty("partitionExpirationDays")) + object.partitionExpirationDays = message.partitionExpirationDays; + if (message.requirePartitionFilter != null && message.hasOwnProperty("requirePartitionFilter")) + object.requirePartitionFilter = message.requirePartitionFilter; + var keys2; + if (message.additionalOptions && (keys2 = Object.keys(message.additionalOptions)).length) { + object.additionalOptions = {}; + for (var j = 0; j < keys2.length; ++j) + object.additionalOptions[keys2[j]] = message.additionalOptions[keys2[j]]; + } + return object; + }; + + /** + * Converts this Relation to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + * @returns {Object.} JSON object + */ + Relation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Relation + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Relation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResultAction.Relation"; + }; + + /** + * RelationType enum. + * @name google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType + * @enum {number} + * @property {number} RELATION_TYPE_UNSPECIFIED=0 RELATION_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} VIEW=2 VIEW value + * @property {number} INCREMENTAL_TABLE=3 INCREMENTAL_TABLE value + * @property {number} MATERIALIZED_VIEW=4 MATERIALIZED_VIEW value + */ + Relation.RelationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "VIEW"] = 2; + values[valuesById[3] = "INCREMENTAL_TABLE"] = 3; + values[valuesById[4] = "MATERIALIZED_VIEW"] = 4; + return values; + })(); + + Relation.IncrementalTableConfig = (function() { + + /** + * Properties of an IncrementalTableConfig. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @interface IIncrementalTableConfig + * @property {string|null} [incrementalSelectQuery] IncrementalTableConfig incrementalSelectQuery + * @property {boolean|null} [refreshDisabled] IncrementalTableConfig refreshDisabled + * @property {Array.|null} [uniqueKeyParts] IncrementalTableConfig uniqueKeyParts + * @property {string|null} [updatePartitionFilter] IncrementalTableConfig updatePartitionFilter + * @property {Array.|null} [incrementalPreOperations] IncrementalTableConfig incrementalPreOperations + * @property {Array.|null} [incrementalPostOperations] IncrementalTableConfig incrementalPostOperations + */ + + /** + * Constructs a new IncrementalTableConfig. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @classdesc Represents an IncrementalTableConfig. + * @implements IIncrementalTableConfig + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig=} [properties] Properties to set + */ + function IncrementalTableConfig(properties) { + this.uniqueKeyParts = []; + this.incrementalPreOperations = []; + this.incrementalPostOperations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IncrementalTableConfig incrementalSelectQuery. + * @member {string} incrementalSelectQuery + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalSelectQuery = ""; + + /** + * IncrementalTableConfig refreshDisabled. + * @member {boolean} refreshDisabled + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.refreshDisabled = false; + + /** + * IncrementalTableConfig uniqueKeyParts. + * @member {Array.} uniqueKeyParts + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.uniqueKeyParts = $util.emptyArray; + + /** + * IncrementalTableConfig updatePartitionFilter. + * @member {string} updatePartitionFilter + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.updatePartitionFilter = ""; + + /** + * IncrementalTableConfig incrementalPreOperations. + * @member {Array.} incrementalPreOperations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalPreOperations = $util.emptyArray; + + /** + * IncrementalTableConfig incrementalPostOperations. + * @member {Array.} incrementalPostOperations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalPostOperations = $util.emptyArray; + + /** + * Creates a new IncrementalTableConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig instance + */ + IncrementalTableConfig.create = function create(properties) { + return new IncrementalTableConfig(properties); + }; + + /** + * Encodes the specified IncrementalTableConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig} message IncrementalTableConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalTableConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.incrementalSelectQuery != null && Object.hasOwnProperty.call(message, "incrementalSelectQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.incrementalSelectQuery); + if (message.refreshDisabled != null && Object.hasOwnProperty.call(message, "refreshDisabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.refreshDisabled); + if (message.uniqueKeyParts != null && message.uniqueKeyParts.length) + for (var i = 0; i < message.uniqueKeyParts.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uniqueKeyParts[i]); + if (message.updatePartitionFilter != null && Object.hasOwnProperty.call(message, "updatePartitionFilter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.updatePartitionFilter); + if (message.incrementalPreOperations != null && message.incrementalPreOperations.length) + for (var i = 0; i < message.incrementalPreOperations.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.incrementalPreOperations[i]); + if (message.incrementalPostOperations != null && message.incrementalPostOperations.length) + for (var i = 0; i < message.incrementalPostOperations.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.incrementalPostOperations[i]); + return writer; + }; + + /** + * Encodes the specified IncrementalTableConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig} message IncrementalTableConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalTableConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalTableConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.incrementalSelectQuery = reader.string(); + break; + } + case 2: { + message.refreshDisabled = reader.bool(); + break; + } + case 3: { + if (!(message.uniqueKeyParts && message.uniqueKeyParts.length)) + message.uniqueKeyParts = []; + message.uniqueKeyParts.push(reader.string()); + break; + } + case 4: { + message.updatePartitionFilter = reader.string(); + break; + } + case 5: { + if (!(message.incrementalPreOperations && message.incrementalPreOperations.length)) + message.incrementalPreOperations = []; + message.incrementalPreOperations.push(reader.string()); + break; + } + case 6: { + if (!(message.incrementalPostOperations && message.incrementalPostOperations.length)) + message.incrementalPostOperations = []; + message.incrementalPostOperations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalTableConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IncrementalTableConfig message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IncrementalTableConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.incrementalSelectQuery != null && message.hasOwnProperty("incrementalSelectQuery")) + if (!$util.isString(message.incrementalSelectQuery)) + return "incrementalSelectQuery: string expected"; + if (message.refreshDisabled != null && message.hasOwnProperty("refreshDisabled")) + if (typeof message.refreshDisabled !== "boolean") + return "refreshDisabled: boolean expected"; + if (message.uniqueKeyParts != null && message.hasOwnProperty("uniqueKeyParts")) { + if (!Array.isArray(message.uniqueKeyParts)) + return "uniqueKeyParts: array expected"; + for (var i = 0; i < message.uniqueKeyParts.length; ++i) + if (!$util.isString(message.uniqueKeyParts[i])) + return "uniqueKeyParts: string[] expected"; + } + if (message.updatePartitionFilter != null && message.hasOwnProperty("updatePartitionFilter")) + if (!$util.isString(message.updatePartitionFilter)) + return "updatePartitionFilter: string expected"; + if (message.incrementalPreOperations != null && message.hasOwnProperty("incrementalPreOperations")) { + if (!Array.isArray(message.incrementalPreOperations)) + return "incrementalPreOperations: array expected"; + for (var i = 0; i < message.incrementalPreOperations.length; ++i) + if (!$util.isString(message.incrementalPreOperations[i])) + return "incrementalPreOperations: string[] expected"; + } + if (message.incrementalPostOperations != null && message.hasOwnProperty("incrementalPostOperations")) { + if (!Array.isArray(message.incrementalPostOperations)) + return "incrementalPostOperations: array expected"; + for (var i = 0; i < message.incrementalPostOperations.length; ++i) + if (!$util.isString(message.incrementalPostOperations[i])) + return "incrementalPostOperations: string[] expected"; + } + return null; + }; + + /** + * Creates an IncrementalTableConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + */ + IncrementalTableConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig(); + if (object.incrementalSelectQuery != null) + message.incrementalSelectQuery = String(object.incrementalSelectQuery); + if (object.refreshDisabled != null) + message.refreshDisabled = Boolean(object.refreshDisabled); + if (object.uniqueKeyParts) { + if (!Array.isArray(object.uniqueKeyParts)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.uniqueKeyParts: array expected"); + message.uniqueKeyParts = []; + for (var i = 0; i < object.uniqueKeyParts.length; ++i) + message.uniqueKeyParts[i] = String(object.uniqueKeyParts[i]); + } + if (object.updatePartitionFilter != null) + message.updatePartitionFilter = String(object.updatePartitionFilter); + if (object.incrementalPreOperations) { + if (!Array.isArray(object.incrementalPreOperations)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.incrementalPreOperations: array expected"); + message.incrementalPreOperations = []; + for (var i = 0; i < object.incrementalPreOperations.length; ++i) + message.incrementalPreOperations[i] = String(object.incrementalPreOperations[i]); + } + if (object.incrementalPostOperations) { + if (!Array.isArray(object.incrementalPostOperations)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.incrementalPostOperations: array expected"); + message.incrementalPostOperations = []; + for (var i = 0; i < object.incrementalPostOperations.length; ++i) + message.incrementalPostOperations[i] = String(object.incrementalPostOperations[i]); + } + return message; + }; + + /** + * Creates a plain object from an IncrementalTableConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} message IncrementalTableConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IncrementalTableConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uniqueKeyParts = []; + object.incrementalPreOperations = []; + object.incrementalPostOperations = []; + } + if (options.defaults) { + object.incrementalSelectQuery = ""; + object.refreshDisabled = false; + object.updatePartitionFilter = ""; + } + if (message.incrementalSelectQuery != null && message.hasOwnProperty("incrementalSelectQuery")) + object.incrementalSelectQuery = message.incrementalSelectQuery; + if (message.refreshDisabled != null && message.hasOwnProperty("refreshDisabled")) + object.refreshDisabled = message.refreshDisabled; + if (message.uniqueKeyParts && message.uniqueKeyParts.length) { + object.uniqueKeyParts = []; + for (var j = 0; j < message.uniqueKeyParts.length; ++j) + object.uniqueKeyParts[j] = message.uniqueKeyParts[j]; + } + if (message.updatePartitionFilter != null && message.hasOwnProperty("updatePartitionFilter")) + object.updatePartitionFilter = message.updatePartitionFilter; + if (message.incrementalPreOperations && message.incrementalPreOperations.length) { + object.incrementalPreOperations = []; + for (var j = 0; j < message.incrementalPreOperations.length; ++j) + object.incrementalPreOperations[j] = message.incrementalPreOperations[j]; + } + if (message.incrementalPostOperations && message.incrementalPostOperations.length) { + object.incrementalPostOperations = []; + for (var j = 0; j < message.incrementalPostOperations.length; ++j) + object.incrementalPostOperations[j] = message.incrementalPostOperations[j]; + } + return object; + }; + + /** + * Converts this IncrementalTableConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + * @returns {Object.} JSON object + */ + IncrementalTableConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IncrementalTableConfig + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IncrementalTableConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig"; + }; + + return IncrementalTableConfig; + })(); + + return Relation; + })(); + + CompilationResultAction.Operations = (function() { + + /** + * Properties of an Operations. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @interface IOperations + * @property {Array.|null} [dependencyTargets] Operations dependencyTargets + * @property {boolean|null} [disabled] Operations disabled + * @property {Array.|null} [tags] Operations tags + * @property {google.cloud.dataform.v1beta1.IRelationDescriptor|null} [relationDescriptor] Operations relationDescriptor + * @property {Array.|null} [queries] Operations queries + * @property {boolean|null} [hasOutput] Operations hasOutput + */ + + /** + * Constructs a new Operations. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @classdesc Represents an Operations. + * @implements IOperations + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations=} [properties] Properties to set + */ + function Operations(properties) { + this.dependencyTargets = []; + this.tags = []; + this.queries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operations dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.dependencyTargets = $util.emptyArray; + + /** + * Operations disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.disabled = false; + + /** + * Operations tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.tags = $util.emptyArray; + + /** + * Operations relationDescriptor. + * @member {google.cloud.dataform.v1beta1.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.relationDescriptor = null; + + /** + * Operations queries. + * @member {Array.} queries + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.queries = $util.emptyArray; + + /** + * Operations hasOutput. + * @member {boolean} hasOutput + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.hasOutput = false; + + /** + * Creates a new Operations instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} Operations instance + */ + Operations.create = function create(properties) { + return new Operations(properties); + }; + + /** + * Encodes the specified Operations message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations} message Operations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operations.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1beta1.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.queries != null && message.queries.length) + for (var i = 0; i < message.queries.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.queries[i]); + if (message.hasOutput != null && Object.hasOwnProperty.call(message, "hasOutput")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasOutput); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operations message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations} message Operations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operations.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operations message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operations.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + message.disabled = reader.bool(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 6: { + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.queries && message.queries.length)) + message.queries = []; + message.queries.push(reader.string()); + break; + } + case 5: { + message.hasOutput = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operations message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operations.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operations message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operations.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + if (message.queries != null && message.hasOwnProperty("queries")) { + if (!Array.isArray(message.queries)) + return "queries: array expected"; + for (var i = 0; i < message.queries.length; ++i) + if (!$util.isString(message.queries[i])) + return "queries: string[] expected"; + } + if (message.hasOutput != null && message.hasOwnProperty("hasOutput")) + if (typeof message.hasOutput !== "boolean") + return "hasOutput: boolean expected"; + return null; + }; + + /** + * Creates an Operations message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} Operations + */ + Operations.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); + } + if (object.queries) { + if (!Array.isArray(object.queries)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.queries: array expected"); + message.queries = []; + for (var i = 0; i < object.queries.length; ++i) + message.queries[i] = String(object.queries[i]); + } + if (object.hasOutput != null) + message.hasOutput = Boolean(object.hasOutput); + return message; + }; + + /** + * Creates a plain object from an Operations message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} message Operations + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operations.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + object.queries = []; + } + if (options.defaults) { + object.disabled = false; + object.hasOutput = false; + object.relationDescriptor = null; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1beta1.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.queries && message.queries.length) { + object.queries = []; + for (var j = 0; j < message.queries.length; ++j) + object.queries[j] = message.queries[j]; + } + if (message.hasOutput != null && message.hasOwnProperty("hasOutput")) + object.hasOutput = message.hasOutput; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Operations to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + * @returns {Object.} JSON object + */ + Operations.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operations + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operations.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResultAction.Operations"; + }; + + return Operations; + })(); + + CompilationResultAction.Assertion = (function() { + + /** + * Properties of an Assertion. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @interface IAssertion + * @property {Array.|null} [dependencyTargets] Assertion dependencyTargets + * @property {google.cloud.dataform.v1beta1.ITarget|null} [parentAction] Assertion parentAction + * @property {boolean|null} [disabled] Assertion disabled + * @property {Array.|null} [tags] Assertion tags + * @property {string|null} [selectQuery] Assertion selectQuery + * @property {google.cloud.dataform.v1beta1.IRelationDescriptor|null} [relationDescriptor] Assertion relationDescriptor + */ + + /** + * Constructs a new Assertion. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @classdesc Represents an Assertion. + * @implements IAssertion + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion=} [properties] Properties to set + */ + function Assertion(properties) { + this.dependencyTargets = []; + this.tags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Assertion dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.dependencyTargets = $util.emptyArray; + + /** + * Assertion parentAction. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} parentAction + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.parentAction = null; + + /** + * Assertion disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.disabled = false; + + /** + * Assertion tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.tags = $util.emptyArray; + + /** + * Assertion selectQuery. + * @member {string} selectQuery + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.selectQuery = ""; + + /** + * Assertion relationDescriptor. + * @member {google.cloud.dataform.v1beta1.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.relationDescriptor = null; + + /** + * Creates a new Assertion instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} Assertion instance + */ + Assertion.create = function create(properties) { + return new Assertion(properties); + }; + + /** + * Encodes the specified Assertion message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion} message Assertion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Assertion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1beta1.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.selectQuery != null && Object.hasOwnProperty.call(message, "selectQuery")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.selectQuery); + if (message.parentAction != null && Object.hasOwnProperty.call(message, "parentAction")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.parentAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Assertion message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion} message Assertion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Assertion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Assertion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Assertion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + } + case 5: { + message.parentAction = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + } + case 2: { + message.disabled = reader.bool(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 4: { + message.selectQuery = reader.string(); + break; + } + case 6: { + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Assertion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Assertion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Assertion message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Assertion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.parentAction != null && message.hasOwnProperty("parentAction")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.parentAction); + if (error) + return "parentAction." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + if (!$util.isString(message.selectQuery)) + return "selectQuery: string expected"; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + return null; + }; + + /** + * Creates an Assertion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} Assertion + */ + Assertion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.parentAction != null) { + if (typeof object.parentAction !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.parentAction: object expected"); + message.parentAction = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.parentAction); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.selectQuery != null) + message.selectQuery = String(object.selectQuery); + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); + } + return message; + }; + + /** + * Creates a plain object from an Assertion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} message Assertion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Assertion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + } + if (options.defaults) { + object.disabled = false; + object.selectQuery = ""; + object.parentAction = null; + object.relationDescriptor = null; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1beta1.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + object.selectQuery = message.selectQuery; + if (message.parentAction != null && message.hasOwnProperty("parentAction")) + object.parentAction = $root.google.cloud.dataform.v1beta1.Target.toObject(message.parentAction, options); + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Assertion to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + * @returns {Object.} JSON object + */ + Assertion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Assertion + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Assertion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResultAction.Assertion"; + }; + + return Assertion; + })(); + + CompilationResultAction.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @interface IDeclaration + * @property {google.cloud.dataform.v1beta1.IRelationDescriptor|null} [relationDescriptor] Declaration relationDescriptor + */ + + /** + * Constructs a new Declaration. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration relationDescriptor. + * @member {google.cloud.dataform.v1beta1.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @instance + */ + Declaration.prototype.relationDescriptor = null; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration(); + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); + } + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.relationDescriptor = null; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResultAction.Declaration"; + }; + + return Declaration; + })(); + + return CompilationResultAction; + })(); + + v1beta1.QueryCompilationResultActionsRequest = (function() { + + /** + * Properties of a QueryCompilationResultActionsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryCompilationResultActionsRequest + * @property {string|null} [name] QueryCompilationResultActionsRequest name + * @property {number|null} [pageSize] QueryCompilationResultActionsRequest pageSize + * @property {string|null} [pageToken] QueryCompilationResultActionsRequest pageToken + * @property {string|null} [filter] QueryCompilationResultActionsRequest filter + */ + + /** + * Constructs a new QueryCompilationResultActionsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryCompilationResultActionsRequest. + * @implements IQueryCompilationResultActionsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest=} [properties] Properties to set + */ + function QueryCompilationResultActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryCompilationResultActionsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.name = ""; + + /** + * QueryCompilationResultActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.pageSize = 0; + + /** + * QueryCompilationResultActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.pageToken = ""; + + /** + * QueryCompilationResultActionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.filter = ""; + + /** + * Creates a new QueryCompilationResultActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest instance + */ + QueryCompilationResultActionsRequest.create = function create(properties) { + return new QueryCompilationResultActionsRequest(properties); + }; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCompilationResultActionsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCompilationResultActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a QueryCompilationResultActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + */ + QueryCompilationResultActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a QueryCompilationResultActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCompilationResultActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this QueryCompilationResultActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryCompilationResultActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryCompilationResultActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryCompilationResultActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest"; + }; + + return QueryCompilationResultActionsRequest; + })(); + + v1beta1.QueryCompilationResultActionsResponse = (function() { + + /** + * Properties of a QueryCompilationResultActionsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryCompilationResultActionsResponse + * @property {Array.|null} [compilationResultActions] QueryCompilationResultActionsResponse compilationResultActions + * @property {string|null} [nextPageToken] QueryCompilationResultActionsResponse nextPageToken + */ + + /** + * Constructs a new QueryCompilationResultActionsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryCompilationResultActionsResponse. + * @implements IQueryCompilationResultActionsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse=} [properties] Properties to set + */ + function QueryCompilationResultActionsResponse(properties) { + this.compilationResultActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryCompilationResultActionsResponse compilationResultActions. + * @member {Array.} compilationResultActions + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @instance + */ + QueryCompilationResultActionsResponse.prototype.compilationResultActions = $util.emptyArray; + + /** + * QueryCompilationResultActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @instance + */ + QueryCompilationResultActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryCompilationResultActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse instance + */ + QueryCompilationResultActionsResponse.create = function create(properties) { + return new QueryCompilationResultActionsResponse(properties); + }; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compilationResultActions != null && message.compilationResultActions.length) + for (var i = 0; i < message.compilationResultActions.length; ++i) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.encode(message.compilationResultActions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.compilationResultActions && message.compilationResultActions.length)) + message.compilationResultActions = []; + message.compilationResultActions.push($root.google.cloud.dataform.v1beta1.CompilationResultAction.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCompilationResultActionsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCompilationResultActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compilationResultActions != null && message.hasOwnProperty("compilationResultActions")) { + if (!Array.isArray(message.compilationResultActions)) + return "compilationResultActions: array expected"; + for (var i = 0; i < message.compilationResultActions.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.verify(message.compilationResultActions[i]); + if (error) + return "compilationResultActions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryCompilationResultActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + */ + QueryCompilationResultActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse(); + if (object.compilationResultActions) { + if (!Array.isArray(object.compilationResultActions)) + throw TypeError(".google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.compilationResultActions: array expected"); + message.compilationResultActions = []; + for (var i = 0; i < object.compilationResultActions.length; ++i) { + if (typeof object.compilationResultActions[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.compilationResultActions: object expected"); + message.compilationResultActions[i] = $root.google.cloud.dataform.v1beta1.CompilationResultAction.fromObject(object.compilationResultActions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryCompilationResultActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCompilationResultActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compilationResultActions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.compilationResultActions && message.compilationResultActions.length) { + object.compilationResultActions = []; + for (var j = 0; j < message.compilationResultActions.length; ++j) + object.compilationResultActions[j] = $root.google.cloud.dataform.v1beta1.CompilationResultAction.toObject(message.compilationResultActions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryCompilationResultActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryCompilationResultActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryCompilationResultActionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryCompilationResultActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse"; + }; + + return QueryCompilationResultActionsResponse; + })(); + + v1beta1.WorkflowInvocation = (function() { + + /** + * Properties of a WorkflowInvocation. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWorkflowInvocation + * @property {string|null} [name] WorkflowInvocation name + * @property {string|null} [compilationResult] WorkflowInvocation compilationResult + * @property {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig|null} [invocationConfig] WorkflowInvocation invocationConfig + * @property {google.cloud.dataform.v1beta1.WorkflowInvocation.State|null} [state] WorkflowInvocation state + * @property {google.type.IInterval|null} [invocationTiming] WorkflowInvocation invocationTiming + */ + + /** + * Constructs a new WorkflowInvocation. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a WorkflowInvocation. + * @implements IWorkflowInvocation + * @constructor + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocation=} [properties] Properties to set + */ + function WorkflowInvocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowInvocation name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.name = ""; + + /** + * WorkflowInvocation compilationResult. + * @member {string} compilationResult + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.compilationResult = ""; + + /** + * WorkflowInvocation invocationConfig. + * @member {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig|null|undefined} invocationConfig + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.invocationConfig = null; + + /** + * WorkflowInvocation state. + * @member {google.cloud.dataform.v1beta1.WorkflowInvocation.State} state + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.state = 0; + + /** + * WorkflowInvocation invocationTiming. + * @member {google.type.IInterval|null|undefined} invocationTiming + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.invocationTiming = null; + + /** + * Creates a new WorkflowInvocation instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocation=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation} WorkflowInvocation instance + */ + WorkflowInvocation.create = function create(properties) { + return new WorkflowInvocation(properties); + }; + + /** + * Encodes the specified WorkflowInvocation message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocation} message WorkflowInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.compilationResult != null && Object.hasOwnProperty.call(message, "compilationResult")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.compilationResult); + if (message.invocationConfig != null && Object.hasOwnProperty.call(message, "invocationConfig")) + $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.encode(message.invocationConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.invocationTiming != null && Object.hasOwnProperty.call(message, "invocationTiming")) + $root.google.type.Interval.encode(message.invocationTiming, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WorkflowInvocation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocation} message WorkflowInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation} WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.compilationResult = reader.string(); + break; + } + case 3: { + message.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation} WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowInvocation message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowInvocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + if (!$util.isString(message.compilationResult)) + return "compilationResult: string expected"; + if (message.invocationConfig != null && message.hasOwnProperty("invocationConfig")) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify(message.invocationConfig); + if (error) + return "invocationConfig." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) { + var error = $root.google.type.Interval.verify(message.invocationTiming); + if (error) + return "invocationTiming." + error; + } + return null; + }; + + /** + * Creates a WorkflowInvocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation} WorkflowInvocation + */ + WorkflowInvocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WorkflowInvocation) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocation(); + if (object.name != null) + message.name = String(object.name); + if (object.compilationResult != null) + message.compilationResult = String(object.compilationResult); + if (object.invocationConfig != null) { + if (typeof object.invocationConfig !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.invocationConfig: object expected"); + message.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.fromObject(object.invocationConfig); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "CANCELING": + case 5: + message.state = 5; + break; + } + if (object.invocationTiming != null) { + if (typeof object.invocationTiming !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.invocationTiming: object expected"); + message.invocationTiming = $root.google.type.Interval.fromObject(object.invocationTiming); + } + return message; + }; + + /** + * Creates a plain object from a WorkflowInvocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation} message WorkflowInvocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowInvocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.compilationResult = ""; + object.invocationConfig = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.invocationTiming = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + object.compilationResult = message.compilationResult; + if (message.invocationConfig != null && message.hasOwnProperty("invocationConfig")) + object.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.toObject(message.invocationConfig, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.WorkflowInvocation.State[message.state] === undefined ? message.state : $root.google.cloud.dataform.v1beta1.WorkflowInvocation.State[message.state] : message.state; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) + object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); + return object; + }; + + /** + * Converts this WorkflowInvocation to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + * @returns {Object.} JSON object + */ + WorkflowInvocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkflowInvocation + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkflowInvocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.WorkflowInvocation"; + }; + + WorkflowInvocation.InvocationConfig = (function() { + + /** + * Properties of an InvocationConfig. + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @interface IInvocationConfig + * @property {Array.|null} [includedTargets] InvocationConfig includedTargets + * @property {Array.|null} [includedTags] InvocationConfig includedTags + * @property {boolean|null} [transitiveDependenciesIncluded] InvocationConfig transitiveDependenciesIncluded + * @property {boolean|null} [transitiveDependentsIncluded] InvocationConfig transitiveDependentsIncluded + * @property {boolean|null} [fullyRefreshIncrementalTablesEnabled] InvocationConfig fullyRefreshIncrementalTablesEnabled + */ + + /** + * Constructs a new InvocationConfig. + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @classdesc Represents an InvocationConfig. + * @implements IInvocationConfig + * @constructor + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig=} [properties] Properties to set + */ + function InvocationConfig(properties) { + this.includedTargets = []; + this.includedTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InvocationConfig includedTargets. + * @member {Array.} includedTargets + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.includedTargets = $util.emptyArray; + + /** + * InvocationConfig includedTags. + * @member {Array.} includedTags + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.includedTags = $util.emptyArray; + + /** + * InvocationConfig transitiveDependenciesIncluded. + * @member {boolean} transitiveDependenciesIncluded + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.transitiveDependenciesIncluded = false; + + /** + * InvocationConfig transitiveDependentsIncluded. + * @member {boolean} transitiveDependentsIncluded + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.transitiveDependentsIncluded = false; + + /** + * InvocationConfig fullyRefreshIncrementalTablesEnabled. + * @member {boolean} fullyRefreshIncrementalTablesEnabled + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.fullyRefreshIncrementalTablesEnabled = false; + + /** + * Creates a new InvocationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} InvocationConfig instance + */ + InvocationConfig.create = function create(properties) { + return new InvocationConfig(properties); + }; + + /** + * Encodes the specified InvocationConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig} message InvocationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvocationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includedTargets != null && message.includedTargets.length) + for (var i = 0; i < message.includedTargets.length; ++i) + $root.google.cloud.dataform.v1beta1.Target.encode(message.includedTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.includedTags != null && message.includedTags.length) + for (var i = 0; i < message.includedTags.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includedTags[i]); + if (message.transitiveDependenciesIncluded != null && Object.hasOwnProperty.call(message, "transitiveDependenciesIncluded")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.transitiveDependenciesIncluded); + if (message.transitiveDependentsIncluded != null && Object.hasOwnProperty.call(message, "transitiveDependentsIncluded")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.transitiveDependentsIncluded); + if (message.fullyRefreshIncrementalTablesEnabled != null && Object.hasOwnProperty.call(message, "fullyRefreshIncrementalTablesEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.fullyRefreshIncrementalTablesEnabled); + return writer; + }; + + /** + * Encodes the specified InvocationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig} message InvocationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvocationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvocationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.includedTargets && message.includedTargets.length)) + message.includedTargets = []; + message.includedTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.includedTags && message.includedTags.length)) + message.includedTags = []; + message.includedTags.push(reader.string()); + break; + } + case 3: { + message.transitiveDependenciesIncluded = reader.bool(); + break; + } + case 4: { + message.transitiveDependentsIncluded = reader.bool(); + break; + } + case 5: { + message.fullyRefreshIncrementalTablesEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvocationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvocationConfig message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvocationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.includedTargets != null && message.hasOwnProperty("includedTargets")) { + if (!Array.isArray(message.includedTargets)) + return "includedTargets: array expected"; + for (var i = 0; i < message.includedTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.includedTargets[i]); + if (error) + return "includedTargets." + error; + } + } + if (message.includedTags != null && message.hasOwnProperty("includedTags")) { + if (!Array.isArray(message.includedTags)) + return "includedTags: array expected"; + for (var i = 0; i < message.includedTags.length; ++i) + if (!$util.isString(message.includedTags[i])) + return "includedTags: string[] expected"; + } + if (message.transitiveDependenciesIncluded != null && message.hasOwnProperty("transitiveDependenciesIncluded")) + if (typeof message.transitiveDependenciesIncluded !== "boolean") + return "transitiveDependenciesIncluded: boolean expected"; + if (message.transitiveDependentsIncluded != null && message.hasOwnProperty("transitiveDependentsIncluded")) + if (typeof message.transitiveDependentsIncluded !== "boolean") + return "transitiveDependentsIncluded: boolean expected"; + if (message.fullyRefreshIncrementalTablesEnabled != null && message.hasOwnProperty("fullyRefreshIncrementalTablesEnabled")) + if (typeof message.fullyRefreshIncrementalTablesEnabled !== "boolean") + return "fullyRefreshIncrementalTablesEnabled: boolean expected"; + return null; + }; + + /** + * Creates an InvocationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} InvocationConfig + */ + InvocationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig(); + if (object.includedTargets) { + if (!Array.isArray(object.includedTargets)) + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.includedTargets: array expected"); + message.includedTargets = []; + for (var i = 0; i < object.includedTargets.length; ++i) { + if (typeof object.includedTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.includedTargets: object expected"); + message.includedTargets[i] = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.includedTargets[i]); + } + } + if (object.includedTags) { + if (!Array.isArray(object.includedTags)) + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.includedTags: array expected"); + message.includedTags = []; + for (var i = 0; i < object.includedTags.length; ++i) + message.includedTags[i] = String(object.includedTags[i]); + } + if (object.transitiveDependenciesIncluded != null) + message.transitiveDependenciesIncluded = Boolean(object.transitiveDependenciesIncluded); + if (object.transitiveDependentsIncluded != null) + message.transitiveDependentsIncluded = Boolean(object.transitiveDependentsIncluded); + if (object.fullyRefreshIncrementalTablesEnabled != null) + message.fullyRefreshIncrementalTablesEnabled = Boolean(object.fullyRefreshIncrementalTablesEnabled); + return message; + }; + + /** + * Creates a plain object from an InvocationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} message InvocationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvocationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includedTargets = []; + object.includedTags = []; + } + if (options.defaults) { + object.transitiveDependenciesIncluded = false; + object.transitiveDependentsIncluded = false; + object.fullyRefreshIncrementalTablesEnabled = false; + } + if (message.includedTargets && message.includedTargets.length) { + object.includedTargets = []; + for (var j = 0; j < message.includedTargets.length; ++j) + object.includedTargets[j] = $root.google.cloud.dataform.v1beta1.Target.toObject(message.includedTargets[j], options); + } + if (message.includedTags && message.includedTags.length) { + object.includedTags = []; + for (var j = 0; j < message.includedTags.length; ++j) + object.includedTags[j] = message.includedTags[j]; + } + if (message.transitiveDependenciesIncluded != null && message.hasOwnProperty("transitiveDependenciesIncluded")) + object.transitiveDependenciesIncluded = message.transitiveDependenciesIncluded; + if (message.transitiveDependentsIncluded != null && message.hasOwnProperty("transitiveDependentsIncluded")) + object.transitiveDependentsIncluded = message.transitiveDependentsIncluded; + if (message.fullyRefreshIncrementalTablesEnabled != null && message.hasOwnProperty("fullyRefreshIncrementalTablesEnabled")) + object.fullyRefreshIncrementalTablesEnabled = message.fullyRefreshIncrementalTablesEnabled; + return object; + }; + + /** + * Converts this InvocationConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + * @returns {Object.} JSON object + */ + InvocationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InvocationConfig + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InvocationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig"; + }; + + return InvocationConfig; + })(); + + /** + * State enum. + * @name google.cloud.dataform.v1beta1.WorkflowInvocation.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} FAILED=4 FAILED value + * @property {number} CANCELING=5 CANCELING value + */ + WorkflowInvocation.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "CANCELING"] = 5; + return values; + })(); + + return WorkflowInvocation; + })(); + + v1beta1.ListWorkflowInvocationsRequest = (function() { + + /** + * Properties of a ListWorkflowInvocationsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListWorkflowInvocationsRequest + * @property {string|null} [parent] ListWorkflowInvocationsRequest parent + * @property {number|null} [pageSize] ListWorkflowInvocationsRequest pageSize + * @property {string|null} [pageToken] ListWorkflowInvocationsRequest pageToken + */ + + /** + * Constructs a new ListWorkflowInvocationsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListWorkflowInvocationsRequest. + * @implements IListWorkflowInvocationsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest=} [properties] Properties to set + */ + function ListWorkflowInvocationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkflowInvocationsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.parent = ""; + + /** + * ListWorkflowInvocationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.pageSize = 0; + + /** + * ListWorkflowInvocationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListWorkflowInvocationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest instance + */ + ListWorkflowInvocationsRequest.create = function create(properties) { + return new ListWorkflowInvocationsRequest(properties); + }; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkflowInvocationsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkflowInvocationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListWorkflowInvocationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + */ + ListWorkflowInvocationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListWorkflowInvocationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkflowInvocationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListWorkflowInvocationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkflowInvocationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkflowInvocationsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkflowInvocationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest"; + }; + + return ListWorkflowInvocationsRequest; + })(); + + v1beta1.ListWorkflowInvocationsResponse = (function() { + + /** + * Properties of a ListWorkflowInvocationsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListWorkflowInvocationsResponse + * @property {Array.|null} [workflowInvocations] ListWorkflowInvocationsResponse workflowInvocations + * @property {string|null} [nextPageToken] ListWorkflowInvocationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListWorkflowInvocationsResponse unreachable + */ + + /** + * Constructs a new ListWorkflowInvocationsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListWorkflowInvocationsResponse. + * @implements IListWorkflowInvocationsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse=} [properties] Properties to set + */ + function ListWorkflowInvocationsResponse(properties) { + this.workflowInvocations = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkflowInvocationsResponse workflowInvocations. + * @member {Array.} workflowInvocations + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.workflowInvocations = $util.emptyArray; + + /** + * ListWorkflowInvocationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.nextPageToken = ""; + + /** + * ListWorkflowInvocationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListWorkflowInvocationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse instance + */ + ListWorkflowInvocationsResponse.create = function create(properties) { + return new ListWorkflowInvocationsResponse(properties); + }; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workflowInvocations != null && message.workflowInvocations.length) + for (var i = 0; i < message.workflowInvocations.length; ++i) + $root.google.cloud.dataform.v1beta1.WorkflowInvocation.encode(message.workflowInvocations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.workflowInvocations && message.workflowInvocations.length)) + message.workflowInvocations = []; + message.workflowInvocations.push($root.google.cloud.dataform.v1beta1.WorkflowInvocation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkflowInvocationsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkflowInvocationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workflowInvocations != null && message.hasOwnProperty("workflowInvocations")) { + if (!Array.isArray(message.workflowInvocations)) + return "workflowInvocations: array expected"; + for (var i = 0; i < message.workflowInvocations.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.verify(message.workflowInvocations[i]); + if (error) + return "workflowInvocations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListWorkflowInvocationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + */ + ListWorkflowInvocationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse(); + if (object.workflowInvocations) { + if (!Array.isArray(object.workflowInvocations)) + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.workflowInvocations: array expected"); + message.workflowInvocations = []; + for (var i = 0; i < object.workflowInvocations.length; ++i) { + if (typeof object.workflowInvocations[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.workflowInvocations: object expected"); + message.workflowInvocations[i] = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.fromObject(object.workflowInvocations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListWorkflowInvocationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkflowInvocationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.workflowInvocations = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.workflowInvocations && message.workflowInvocations.length) { + object.workflowInvocations = []; + for (var j = 0; j < message.workflowInvocations.length; ++j) + object.workflowInvocations[j] = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.toObject(message.workflowInvocations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListWorkflowInvocationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkflowInvocationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkflowInvocationsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkflowInvocationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse"; + }; + + return ListWorkflowInvocationsResponse; + })(); + + v1beta1.GetWorkflowInvocationRequest = (function() { + + /** + * Properties of a GetWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IGetWorkflowInvocationRequest + * @property {string|null} [name] GetWorkflowInvocationRequest name + */ + + /** + * Constructs a new GetWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a GetWorkflowInvocationRequest. + * @implements IGetWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest=} [properties] Properties to set + */ + function GetWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @instance + */ + GetWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new GetWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest instance + */ + GetWorkflowInvocationRequest.create = function create(properties) { + return new GetWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified GetWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest} message GetWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowInvocationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest} message GetWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkflowInvocationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + */ + GetWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} message GetWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest"; + }; + + return GetWorkflowInvocationRequest; + })(); + + v1beta1.CreateWorkflowInvocationRequest = (function() { + + /** + * Properties of a CreateWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICreateWorkflowInvocationRequest + * @property {string|null} [parent] CreateWorkflowInvocationRequest parent + * @property {google.cloud.dataform.v1beta1.IWorkflowInvocation|null} [workflowInvocation] CreateWorkflowInvocationRequest workflowInvocation + */ + + /** + * Constructs a new CreateWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CreateWorkflowInvocationRequest. + * @implements ICreateWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest=} [properties] Properties to set + */ + function CreateWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateWorkflowInvocationRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @instance + */ + CreateWorkflowInvocationRequest.prototype.parent = ""; + + /** + * CreateWorkflowInvocationRequest workflowInvocation. + * @member {google.cloud.dataform.v1beta1.IWorkflowInvocation|null|undefined} workflowInvocation + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @instance + */ + CreateWorkflowInvocationRequest.prototype.workflowInvocation = null; + + /** + * Creates a new CreateWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest instance + */ + CreateWorkflowInvocationRequest.create = function create(properties) { + return new CreateWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkflowInvocationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.workflowInvocation != null && Object.hasOwnProperty.call(message, "workflowInvocation")) + $root.google.cloud.dataform.v1beta1.WorkflowInvocation.encode(message.workflowInvocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.workflowInvocation = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWorkflowInvocationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.workflowInvocation != null && message.hasOwnProperty("workflowInvocation")) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.verify(message.workflowInvocation); + if (error) + return "workflowInvocation." + error; + } + return null; + }; + + /** + * Creates a CreateWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + */ + CreateWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.workflowInvocation != null) { + if (typeof object.workflowInvocation !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.workflowInvocation: object expected"); + message.workflowInvocation = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.fromObject(object.workflowInvocation); + } + return message; + }; + + /** + * Creates a plain object from a CreateWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.workflowInvocation = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.workflowInvocation != null && message.hasOwnProperty("workflowInvocation")) + object.workflowInvocation = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.toObject(message.workflowInvocation, options); + return object; + }; + + /** + * Converts this CreateWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest"; + }; + + return CreateWorkflowInvocationRequest; + })(); + + v1beta1.DeleteWorkflowInvocationRequest = (function() { + + /** + * Properties of a DeleteWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IDeleteWorkflowInvocationRequest + * @property {string|null} [name] DeleteWorkflowInvocationRequest name + */ + + /** + * Constructs a new DeleteWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a DeleteWorkflowInvocationRequest. + * @implements IDeleteWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest=} [properties] Properties to set + */ + function DeleteWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @instance + */ + DeleteWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new DeleteWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest instance + */ + DeleteWorkflowInvocationRequest.create = function create(properties) { + return new DeleteWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkflowInvocationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteWorkflowInvocationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + */ + DeleteWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest"; + }; + + return DeleteWorkflowInvocationRequest; + })(); + + v1beta1.CancelWorkflowInvocationRequest = (function() { + + /** + * Properties of a CancelWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICancelWorkflowInvocationRequest + * @property {string|null} [name] CancelWorkflowInvocationRequest name + */ + + /** + * Constructs a new CancelWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CancelWorkflowInvocationRequest. + * @implements ICancelWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest=} [properties] Properties to set + */ + function CancelWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @instance + */ + CancelWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new CancelWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest instance + */ + CancelWorkflowInvocationRequest.create = function create(properties) { + return new CancelWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelWorkflowInvocationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelWorkflowInvocationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + */ + CancelWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest"; + }; + + return CancelWorkflowInvocationRequest; + })(); + + v1beta1.WorkflowInvocationAction = (function() { + + /** + * Properties of a WorkflowInvocationAction. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWorkflowInvocationAction + * @property {google.cloud.dataform.v1beta1.ITarget|null} [target] WorkflowInvocationAction target + * @property {google.cloud.dataform.v1beta1.ITarget|null} [canonicalTarget] WorkflowInvocationAction canonicalTarget + * @property {google.cloud.dataform.v1beta1.WorkflowInvocationAction.State|null} [state] WorkflowInvocationAction state + * @property {string|null} [failureReason] WorkflowInvocationAction failureReason + * @property {google.type.IInterval|null} [invocationTiming] WorkflowInvocationAction invocationTiming + * @property {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction|null} [bigqueryAction] WorkflowInvocationAction bigqueryAction + */ + + /** + * Constructs a new WorkflowInvocationAction. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a WorkflowInvocationAction. + * @implements IWorkflowInvocationAction + * @constructor + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocationAction=} [properties] Properties to set + */ + function WorkflowInvocationAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowInvocationAction target. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} target + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.target = null; + + /** + * WorkflowInvocationAction canonicalTarget. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} canonicalTarget + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.canonicalTarget = null; + + /** + * WorkflowInvocationAction state. + * @member {google.cloud.dataform.v1beta1.WorkflowInvocationAction.State} state + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.state = 0; + + /** + * WorkflowInvocationAction failureReason. + * @member {string} failureReason + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.failureReason = ""; + + /** + * WorkflowInvocationAction invocationTiming. + * @member {google.type.IInterval|null|undefined} invocationTiming + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.invocationTiming = null; + + /** + * WorkflowInvocationAction bigqueryAction. + * @member {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction|null|undefined} bigqueryAction + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.bigqueryAction = null; + + /** + * Creates a new WorkflowInvocationAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocationAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction} WorkflowInvocationAction instance + */ + WorkflowInvocationAction.create = function create(properties) { + return new WorkflowInvocationAction(properties); + }; + + /** + * Encodes the specified WorkflowInvocationAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocationAction} message WorkflowInvocationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocationAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.canonicalTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.invocationTiming != null && Object.hasOwnProperty.call(message, "invocationTiming")) + $root.google.type.Interval.encode(message.invocationTiming, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.bigqueryAction != null && Object.hasOwnProperty.call(message, "bigqueryAction")) + $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.encode(message.bigqueryAction, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.failureReason); + return writer; + }; + + /** + * Encodes the specified WorkflowInvocationAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocationAction} message WorkflowInvocationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocationAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction} WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocationAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.target = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + } + case 2: { + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 7: { + message.failureReason = reader.string(); + break; + } + case 5: { + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + } + case 6: { + message.bigqueryAction = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction} WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocationAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowInvocationAction message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowInvocationAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.canonicalTarget); + if (error) + return "canonicalTarget." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) { + var error = $root.google.type.Interval.verify(message.invocationTiming); + if (error) + return "invocationTiming." + error; + } + if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify(message.bigqueryAction); + if (error) + return "bigqueryAction." + error; + } + return null; + }; + + /** + * Creates a WorkflowInvocationAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction} WorkflowInvocationAction + */ + WorkflowInvocationAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction(); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocationAction.target: object expected"); + message.target = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.target); + } + if (object.canonicalTarget != null) { + if (typeof object.canonicalTarget !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocationAction.canonicalTarget: object expected"); + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.canonicalTarget); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "PENDING": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SKIPPED": + case 2: + message.state = 2; + break; + case "DISABLED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "CANCELLED": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + } + if (object.failureReason != null) + message.failureReason = String(object.failureReason); + if (object.invocationTiming != null) { + if (typeof object.invocationTiming !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocationAction.invocationTiming: object expected"); + message.invocationTiming = $root.google.type.Interval.fromObject(object.invocationTiming); + } + if (object.bigqueryAction != null) { + if (typeof object.bigqueryAction !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocationAction.bigqueryAction: object expected"); + message.bigqueryAction = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.fromObject(object.bigqueryAction); + } + return message; + }; + + /** + * Creates a plain object from a WorkflowInvocationAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction} message WorkflowInvocationAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowInvocationAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = null; + object.canonicalTarget = null; + object.state = options.enums === String ? "PENDING" : 0; + object.invocationTiming = null; + object.bigqueryAction = null; + object.failureReason = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.dataform.v1beta1.Target.toObject(message.target, options); + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) + object.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.toObject(message.canonicalTarget, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.State[message.state] === undefined ? message.state : $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.State[message.state] : message.state; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) + object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); + if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) + object.bigqueryAction = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.toObject(message.bigqueryAction, options); + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; + return object; + }; + + /** + * Converts this WorkflowInvocationAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + * @returns {Object.} JSON object + */ + WorkflowInvocationAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkflowInvocationAction + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkflowInvocationAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.WorkflowInvocationAction"; + }; + + /** + * State enum. + * @name google.cloud.dataform.v1beta1.WorkflowInvocationAction.State + * @enum {number} + * @property {number} PENDING=0 PENDING value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SKIPPED=2 SKIPPED value + * @property {number} DISABLED=3 DISABLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} CANCELLED=5 CANCELLED value + * @property {number} FAILED=6 FAILED value + */ + WorkflowInvocationAction.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PENDING"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SKIPPED"] = 2; + values[valuesById[3] = "DISABLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "CANCELLED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + return values; + })(); + + WorkflowInvocationAction.BigQueryAction = (function() { + + /** + * Properties of a BigQueryAction. + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @interface IBigQueryAction + * @property {string|null} [sqlScript] BigQueryAction sqlScript + */ + + /** + * Constructs a new BigQueryAction. + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @classdesc Represents a BigQueryAction. + * @implements IBigQueryAction + * @constructor + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction=} [properties] Properties to set + */ + function BigQueryAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryAction sqlScript. + * @member {string} sqlScript + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @instance + */ + BigQueryAction.prototype.sqlScript = ""; + + /** + * Creates a new BigQueryAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} BigQueryAction instance + */ + BigQueryAction.create = function create(properties) { + return new BigQueryAction(properties); + }; + + /** + * Encodes the specified BigQueryAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction} message BigQueryAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlScript); + return writer; + }; + + /** + * Encodes the specified BigQueryAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction} message BigQueryAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sqlScript = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryAction message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) + if (!$util.isString(message.sqlScript)) + return "sqlScript: string expected"; + return null; + }; + + /** + * Creates a BigQueryAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} BigQueryAction + */ + BigQueryAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction(); + if (object.sqlScript != null) + message.sqlScript = String(object.sqlScript); + return message; + }; + + /** + * Creates a plain object from a BigQueryAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} message BigQueryAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sqlScript = ""; + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) + object.sqlScript = message.sqlScript; + return object; + }; + + /** + * Converts this BigQueryAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @instance + * @returns {Object.} JSON object + */ + BigQueryAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryAction + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction"; + }; + + return BigQueryAction; + })(); + + return WorkflowInvocationAction; + })(); + + v1beta1.QueryWorkflowInvocationActionsRequest = (function() { + + /** + * Properties of a QueryWorkflowInvocationActionsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryWorkflowInvocationActionsRequest + * @property {string|null} [name] QueryWorkflowInvocationActionsRequest name + * @property {number|null} [pageSize] QueryWorkflowInvocationActionsRequest pageSize + * @property {string|null} [pageToken] QueryWorkflowInvocationActionsRequest pageToken + */ + + /** + * Constructs a new QueryWorkflowInvocationActionsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryWorkflowInvocationActionsRequest. + * @implements IQueryWorkflowInvocationActionsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest=} [properties] Properties to set + */ + function QueryWorkflowInvocationActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryWorkflowInvocationActionsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.name = ""; + + /** + * QueryWorkflowInvocationActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.pageSize = 0; + + /** + * QueryWorkflowInvocationActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new QueryWorkflowInvocationActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest instance + */ + QueryWorkflowInvocationActionsRequest.create = function create(properties) { + return new QueryWorkflowInvocationActionsRequest(properties); + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryWorkflowInvocationActionsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryWorkflowInvocationActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a QueryWorkflowInvocationActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + */ + QueryWorkflowInvocationActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryWorkflowInvocationActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this QueryWorkflowInvocationActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryWorkflowInvocationActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryWorkflowInvocationActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryWorkflowInvocationActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest"; + }; + + return QueryWorkflowInvocationActionsRequest; + })(); + + v1beta1.QueryWorkflowInvocationActionsResponse = (function() { + + /** + * Properties of a QueryWorkflowInvocationActionsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryWorkflowInvocationActionsResponse + * @property {Array.|null} [workflowInvocationActions] QueryWorkflowInvocationActionsResponse workflowInvocationActions + * @property {string|null} [nextPageToken] QueryWorkflowInvocationActionsResponse nextPageToken + */ + + /** + * Constructs a new QueryWorkflowInvocationActionsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryWorkflowInvocationActionsResponse. + * @implements IQueryWorkflowInvocationActionsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse=} [properties] Properties to set + */ + function QueryWorkflowInvocationActionsResponse(properties) { + this.workflowInvocationActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryWorkflowInvocationActionsResponse workflowInvocationActions. + * @member {Array.} workflowInvocationActions + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @instance + */ + QueryWorkflowInvocationActionsResponse.prototype.workflowInvocationActions = $util.emptyArray; + + /** + * QueryWorkflowInvocationActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @instance + */ + QueryWorkflowInvocationActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryWorkflowInvocationActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse instance + */ + QueryWorkflowInvocationActionsResponse.create = function create(properties) { + return new QueryWorkflowInvocationActionsResponse(properties); + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workflowInvocationActions != null && message.workflowInvocationActions.length) + for (var i = 0; i < message.workflowInvocationActions.length; ++i) + $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.encode(message.workflowInvocationActions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.workflowInvocationActions && message.workflowInvocationActions.length)) + message.workflowInvocationActions = []; + message.workflowInvocationActions.push($root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryWorkflowInvocationActionsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryWorkflowInvocationActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workflowInvocationActions != null && message.hasOwnProperty("workflowInvocationActions")) { + if (!Array.isArray(message.workflowInvocationActions)) + return "workflowInvocationActions: array expected"; + for (var i = 0; i < message.workflowInvocationActions.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify(message.workflowInvocationActions[i]); + if (error) + return "workflowInvocationActions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryWorkflowInvocationActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + */ + QueryWorkflowInvocationActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse(); + if (object.workflowInvocationActions) { + if (!Array.isArray(object.workflowInvocationActions)) + throw TypeError(".google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.workflowInvocationActions: array expected"); + message.workflowInvocationActions = []; + for (var i = 0; i < object.workflowInvocationActions.length; ++i) { + if (typeof object.workflowInvocationActions[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.workflowInvocationActions: object expected"); + message.workflowInvocationActions[i] = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.fromObject(object.workflowInvocationActions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryWorkflowInvocationActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.workflowInvocationActions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.workflowInvocationActions && message.workflowInvocationActions.length) { + object.workflowInvocationActions = []; + for (var j = 0; j < message.workflowInvocationActions.length; ++j) + object.workflowInvocationActions[j] = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.toObject(message.workflowInvocationActions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryWorkflowInvocationActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryWorkflowInvocationActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryWorkflowInvocationActionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryWorkflowInvocationActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse"; + }; + + return QueryWorkflowInvocationActionsResponse; + })(); + + return v1beta1; + })(); + + return dataform; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Interval = (function() { + + /** + * Properties of an Interval. + * @memberof google.type + * @interface IInterval + * @property {google.protobuf.ITimestamp|null} [startTime] Interval startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Interval endTime + */ + + /** + * Constructs a new Interval. + * @memberof google.type + * @classdesc Represents an Interval. + * @implements IInterval + * @constructor + * @param {google.type.IInterval=} [properties] Properties to set + */ + function Interval(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Interval startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.type.Interval + * @instance + */ + Interval.prototype.startTime = null; + + /** + * Interval endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.type.Interval + * @instance + */ + Interval.prototype.endTime = null; + + /** + * Creates a new Interval instance using the specified properties. + * @function create + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval=} [properties] Properties to set + * @returns {google.type.Interval} Interval instance + */ + Interval.create = function create(properties) { + return new Interval(properties); + }; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @function encode + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @function decode + * @memberof google.type.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Interval(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Interval message. + * @function verify + * @memberof google.type.Interval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Interval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Interval + * @static + * @param {Object.} object Plain object + * @returns {google.type.Interval} Interval + */ + Interval.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Interval) + return object; + var message = new $root.google.type.Interval(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.type.Interval.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.type.Interval.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Interval + * @static + * @param {google.type.Interval} message Interval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Interval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this Interval to JSON. + * @function toJSON + * @memberof google.type.Interval + * @instance + * @returns {Object.} JSON object + */ + Interval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Interval + * @function getTypeUrl + * @memberof google.type.Interval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Interval"; + }; + + return Interval; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-dataform/protos/protos.json b/packages/google-cloud-dataform/protos/protos.json new file mode 100644 index 00000000000..82490501443 --- /dev/null +++ b/packages/google-cloud-dataform/protos/protos.json @@ -0,0 +1,5821 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "dataform": { + "nested": { + "v1alpha2": { + "options": { + "csharp_namespace": "Google.Cloud.Dataform.V1Alpha2", + "go_package": "cloud.google.com/go/dataform/apiv1alpha2/dataformpb;dataformpb", + "java_multiple_files": true, + "java_outer_classname": "DataformProto", + "java_package": "com.google.cloud.dataform.v1alpha2", + "php_namespace": "Google\\Cloud\\Dataform\\V1alpha2", + "ruby_package": "Google::Cloud::Dataform::V1alpha2", + "(google.api.resource_definition).type": "secretmanager.googleapis.com/SecretVersion", + "(google.api.resource_definition).pattern": "projects/{project}/secrets/{secret}/versions/{version}" + }, + "nested": { + "Dataform": { + "options": { + "(google.api.default_host)": "dataform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListRepositories": { + "requestType": "ListRepositoriesRequest", + "responseType": "ListRepositoriesResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{parent=projects/*/locations/*}/repositories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{parent=projects/*/locations/*}/repositories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetRepository": { + "requestType": "GetRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateRepository": { + "requestType": "CreateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).post": "/v1alpha2/{parent=projects/*/locations/*}/repositories", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "parent,repository,repository_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{parent=projects/*/locations/*}/repositories", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "parent,repository,repository_id" + } + ] + }, + "UpdateRepository": { + "requestType": "UpdateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).patch": "/v1alpha2/{repository.name=projects/*/locations/*/repositories/*}", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "repository,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha2/{repository.name=projects/*/locations/*/repositories/*}", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "repository,update_mask" + } + ] + }, + "DeleteRepository": { + "requestType": "DeleteRepositoryRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha2/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha2/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "FetchRemoteBranches": { + "requestType": "FetchRemoteBranchesRequest", + "responseType": "FetchRemoteBranchesResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + } + } + ] + }, + "ListWorkspaces": { + "requestType": "ListWorkspacesRequest", + "responseType": "ListWorkspacesResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workspaces", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workspaces" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetWorkspace": { + "requestType": "GetWorkspaceRequest", + "responseType": "Workspace", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateWorkspace": { + "requestType": "CreateWorkspaceRequest", + "responseType": "Workspace", + "options": { + "(google.api.http).post": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workspaces", + "(google.api.http).body": "workspace", + "(google.api.method_signature)": "parent,workspace,workspace_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workspaces", + "body": "workspace" + } + }, + { + "(google.api.method_signature)": "parent,workspace,workspace_id" + } + ] + }, + "DeleteWorkspace": { + "requestType": "DeleteWorkspaceRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "InstallNpmPackages": { + "requestType": "InstallNpmPackagesRequest", + "responseType": "InstallNpmPackagesResponse", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages", + "body": "*" + } + } + ] + }, + "PullGitCommits": { + "requestType": "PullGitCommitsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull", + "body": "*" + } + } + ] + }, + "PushGitCommits": { + "requestType": "PushGitCommitsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:push", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:push", + "body": "*" + } + } + ] + }, + "FetchFileGitStatuses": { + "requestType": "FetchFileGitStatusesRequest", + "responseType": "FetchFileGitStatusesResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + } + } + ] + }, + "FetchGitAheadBehind": { + "requestType": "FetchGitAheadBehindRequest", + "responseType": "FetchGitAheadBehindResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + } + } + ] + }, + "CommitWorkspaceChanges": { + "requestType": "CommitWorkspaceChangesRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit", + "body": "*" + } + } + ] + }, + "ResetWorkspaceChanges": { + "requestType": "ResetWorkspaceChangesRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset", + "body": "*" + } + } + ] + }, + "FetchFileDiff": { + "requestType": "FetchFileDiffRequest", + "responseType": "FetchFileDiffResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + } + } + ] + }, + "QueryDirectoryContents": { + "requestType": "QueryDirectoryContentsRequest", + "responseType": "QueryDirectoryContentsResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + } + } + ] + }, + "MakeDirectory": { + "requestType": "MakeDirectoryRequest", + "responseType": "MakeDirectoryResponse", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory", + "body": "*" + } + } + ] + }, + "RemoveDirectory": { + "requestType": "RemoveDirectoryRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory", + "body": "*" + } + } + ] + }, + "MoveDirectory": { + "requestType": "MoveDirectoryRequest", + "responseType": "MoveDirectoryResponse", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory", + "body": "*" + } + } + ] + }, + "ReadFile": { + "requestType": "ReadFileRequest", + "responseType": "ReadFileResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + } + } + ] + }, + "RemoveFile": { + "requestType": "RemoveFileRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile", + "body": "*" + } + } + ] + }, + "MoveFile": { + "requestType": "MoveFileRequest", + "responseType": "MoveFileResponse", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile", + "body": "*" + } + } + ] + }, + "WriteFile": { + "requestType": "WriteFileRequest", + "responseType": "WriteFileResponse", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile", + "body": "*" + } + } + ] + }, + "ListCompilationResults": { + "requestType": "ListCompilationResultsRequest", + "responseType": "ListCompilationResultsResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/compilationResults" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetCompilationResult": { + "requestType": "GetCompilationResultRequest", + "responseType": "CompilationResult", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/compilationResults/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/compilationResults/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateCompilationResult": { + "requestType": "CreateCompilationResultRequest", + "responseType": "CompilationResult", + "options": { + "(google.api.http).post": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "(google.api.http).body": "compilation_result", + "(google.api.method_signature)": "parent,compilation_result" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "body": "compilation_result" + } + }, + { + "(google.api.method_signature)": "parent,compilation_result" + } + ] + }, + "QueryCompilationResultActions": { + "requestType": "QueryCompilationResultActionsRequest", + "responseType": "QueryCompilationResultActionsResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + } + } + ] + }, + "ListWorkflowInvocations": { + "requestType": "ListWorkflowInvocationsRequest", + "responseType": "ListWorkflowInvocationsResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetWorkflowInvocation": { + "requestType": "GetWorkflowInvocationRequest", + "responseType": "WorkflowInvocation", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateWorkflowInvocation": { + "requestType": "CreateWorkflowInvocationRequest", + "responseType": "WorkflowInvocation", + "options": { + "(google.api.http).post": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "(google.api.http).body": "workflow_invocation", + "(google.api.method_signature)": "parent,workflow_invocation" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "body": "workflow_invocation" + } + }, + { + "(google.api.method_signature)": "parent,workflow_invocation" + } + ] + }, + "DeleteWorkflowInvocation": { + "requestType": "DeleteWorkflowInvocationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelWorkflowInvocation": { + "requestType": "CancelWorkflowInvocationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel", + "body": "*" + } + } + ] + }, + "QueryWorkflowInvocationActions": { + "requestType": "QueryWorkflowInvocationActionsRequest", + "responseType": "QueryWorkflowInvocationActionsResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + } + } + ] + } + } + }, + "Repository": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/Repository", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gitRemoteSettings": { + "type": "GitRemoteSettings", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "GitRemoteSettings": { + "fields": { + "url": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "defaultBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "authenticationTokenSecretVersion": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, + "tokenStatus": { + "type": "TokenStatus", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "TokenStatus": { + "values": { + "TOKEN_STATUS_UNSPECIFIED": 0, + "NOT_FOUND": 1, + "INVALID": 2, + "VALID": 3 + } + } + } + } + } + }, + "ListRepositoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListRepositoriesResponse": { + "fields": { + "repositories": { + "rule": "repeated", + "type": "Repository", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + } + } + }, + "CreateRepositoryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "repository": { + "type": "Repository", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "repositoryId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateRepositoryRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "repository": { + "type": "Repository", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "FetchRemoteBranchesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + } + } + }, + "FetchRemoteBranchesResponse": { + "fields": { + "branches": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Workspace": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/Workspace", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListWorkspacesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListWorkspacesResponse": { + "fields": { + "workspaces": { + "rule": "repeated", + "type": "Workspace", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "CreateWorkspaceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "workspace": { + "type": "Workspace", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "workspaceId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "CommitAuthor": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "emailAddress": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PullGitCommitsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "author": { + "type": "CommitAuthor", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PushGitCommitsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchFileGitStatusesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "FetchFileGitStatusesResponse": { + "fields": { + "uncommittedFileChanges": { + "rule": "repeated", + "type": "UncommittedFileChange", + "id": 1 + } + }, + "nested": { + "UncommittedFileChange": { + "fields": { + "path": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ADDED": 1, + "DELETED": 2, + "MODIFIED": 3, + "HAS_CONFLICTS": 4 + } + } + } + } + } + }, + "FetchGitAheadBehindRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchGitAheadBehindResponse": { + "fields": { + "commitsAhead": { + "type": "int32", + "id": 1 + }, + "commitsBehind": { + "type": "int32", + "id": 2 + } + } + }, + "CommitWorkspaceChangesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "author": { + "type": "CommitAuthor", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "commitMessage": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ResetWorkspaceChangesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clean": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchFileDiffRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FetchFileDiffResponse": { + "fields": { + "formattedDiff": { + "type": "string", + "id": 1 + } + } + }, + "QueryDirectoryContentsRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryDirectoryContentsResponse": { + "fields": { + "directoryEntries": { + "rule": "repeated", + "type": "DirectoryEntry", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + }, + "nested": { + "DirectoryEntry": { + "oneofs": { + "entry": { + "oneof": [ + "file", + "directory" + ] + } + }, + "fields": { + "file": { + "type": "string", + "id": 1 + }, + "directory": { + "type": "string", + "id": 2 + } + } + } + } + }, + "MakeDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MakeDirectoryResponse": { + "fields": {} + }, + "RemoveDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "newPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveDirectoryResponse": { + "fields": {} + }, + "ReadFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ReadFileResponse": { + "fields": { + "fileContents": { + "type": "bytes", + "id": 1 + } + } + }, + "RemoveFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "newPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveFileResponse": { + "fields": {} + }, + "WriteFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "contents": { + "type": "bytes", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WriteFileResponse": { + "fields": {} + }, + "InstallNpmPackagesRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "InstallNpmPackagesResponse": { + "fields": {} + }, + "CompilationResult": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/CompilationResult", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}" + }, + "oneofs": { + "source": { + "oneof": [ + "gitCommitish", + "workspace" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gitCommitish": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "workspace": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "codeCompilationConfig": { + "type": "CodeCompilationConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataformCoreVersion": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compilationErrors": { + "rule": "repeated", + "type": "CompilationError", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "CodeCompilationConfig": { + "fields": { + "defaultDatabase": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "defaultSchema": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "defaultLocation": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "assertionSchema": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "vars": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "databaseSuffix": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schemaSuffix": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tablePrefix": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CompilationError": { + "fields": { + "message": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stack": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "path": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "actionTarget": { + "type": "Target", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "ListCompilationResultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCompilationResultsResponse": { + "fields": { + "compilationResults": { + "rule": "repeated", + "type": "CompilationResult", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetCompilationResultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + } + } + }, + "CreateCompilationResultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "compilationResult": { + "type": "CompilationResult", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Target": { + "fields": { + "database": { + "type": "string", + "id": 1 + }, + "schema": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "RelationDescriptor": { + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "columns": { + "rule": "repeated", + "type": "ColumnDescriptor", + "id": 2 + }, + "bigqueryLabels": { + "keyType": "string", + "type": "string", + "id": 3 + } + }, + "nested": { + "ColumnDescriptor": { + "fields": { + "path": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "bigqueryPolicyTags": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + } + } + }, + "CompilationResultAction": { + "oneofs": { + "compiledObject": { + "oneof": [ + "relation", + "operations", + "assertion", + "declaration" + ] + } + }, + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "canonicalTarget": { + "type": "Target", + "id": 2 + }, + "filePath": { + "type": "string", + "id": 3 + }, + "relation": { + "type": "Relation", + "id": 4 + }, + "operations": { + "type": "Operations", + "id": 5 + }, + "assertion": { + "type": "Assertion", + "id": 6 + }, + "declaration": { + "type": "Declaration", + "id": 7 + } + }, + "nested": { + "Relation": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 4 + }, + "relationType": { + "type": "RelationType", + "id": 5 + }, + "selectQuery": { + "type": "string", + "id": 6 + }, + "preOperations": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "postOperations": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "incrementalTableConfig": { + "type": "IncrementalTableConfig", + "id": 9 + }, + "partitionExpression": { + "type": "string", + "id": 10 + }, + "clusterExpressions": { + "rule": "repeated", + "type": "string", + "id": 11 + }, + "partitionExpirationDays": { + "type": "int32", + "id": 12 + }, + "requirePartitionFilter": { + "type": "bool", + "id": 13 + }, + "additionalOptions": { + "keyType": "string", + "type": "string", + "id": 14 + } + }, + "nested": { + "RelationType": { + "values": { + "RELATION_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "VIEW": 2, + "INCREMENTAL_TABLE": 3, + "MATERIALIZED_VIEW": 4 + } + }, + "IncrementalTableConfig": { + "fields": { + "incrementalSelectQuery": { + "type": "string", + "id": 1 + }, + "refreshDisabled": { + "type": "bool", + "id": 2 + }, + "uniqueKeyParts": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "updatePartitionFilter": { + "type": "string", + "id": 4 + }, + "incrementalPreOperations": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "incrementalPostOperations": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "Operations": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 6 + }, + "queries": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "hasOutput": { + "type": "bool", + "id": 5 + } + } + }, + "Assertion": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "parentAction": { + "type": "Target", + "id": 5 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "selectQuery": { + "type": "string", + "id": 4 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 6 + } + } + }, + "Declaration": { + "fields": { + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 1 + } + } + } + } + }, + "QueryCompilationResultActionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryCompilationResultActionsResponse": { + "fields": { + "compilationResultActions": { + "rule": "repeated", + "type": "CompilationResultAction", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "WorkflowInvocation": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/WorkflowInvocation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compilationResult": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + }, + "invocationConfig": { + "type": "InvocationConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "invocationTiming": { + "type": "google.type.Interval", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "InvocationConfig": { + "fields": { + "includedTargets": { + "rule": "repeated", + "type": "Target", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "includedTags": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "transitiveDependenciesIncluded": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "transitiveDependentsIncluded": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "fullyRefreshIncrementalTablesEnabled": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "CANCELLED": 3, + "FAILED": 4, + "CANCELING": 5 + } + } + } + }, + "ListWorkflowInvocationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListWorkflowInvocationsResponse": { + "fields": { + "workflowInvocations": { + "rule": "repeated", + "type": "WorkflowInvocation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "CreateWorkflowInvocationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "workflowInvocation": { + "type": "WorkflowInvocation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "CancelWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "WorkflowInvocationAction": { + "fields": { + "target": { + "type": "Target", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "canonicalTarget": { + "type": "Target", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failureReason": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "invocationTiming": { + "type": "google.type.Interval", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bigqueryAction": { + "type": "BigQueryAction", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "PENDING": 0, + "RUNNING": 1, + "SKIPPED": 2, + "DISABLED": 3, + "SUCCEEDED": 4, + "CANCELLED": 5, + "FAILED": 6 + } + }, + "BigQueryAction": { + "fields": { + "sqlScript": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "QueryWorkflowInvocationActionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryWorkflowInvocationActionsResponse": { + "fields": { + "workflowInvocationActions": { + "rule": "repeated", + "type": "WorkflowInvocationAction", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + } + } + }, + "v1beta1": { + "options": { + "csharp_namespace": "Google.Cloud.Dataform.V1Beta1", + "go_package": "cloud.google.com/go/dataform/apiv1beta1/dataformpb;dataformpb", + "java_multiple_files": true, + "java_outer_classname": "DataformProto", + "java_package": "com.google.cloud.dataform.v1beta1", + "php_namespace": "Google\\Cloud\\Dataform\\V1beta1", + "ruby_package": "Google::Cloud::Dataform::V1beta1", + "(google.api.resource_definition).type": "secretmanager.googleapis.com/SecretVersion", + "(google.api.resource_definition).pattern": "projects/{project}/secrets/{secret}/versions/{version}" + }, + "nested": { + "Dataform": { + "options": { + "(google.api.default_host)": "dataform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListRepositories": { + "requestType": "ListRepositoriesRequest", + "responseType": "ListRepositoriesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/repositories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/repositories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetRepository": { + "requestType": "GetRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateRepository": { + "requestType": "CreateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/repositories", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "parent,repository,repository_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/repositories", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "parent,repository,repository_id" + } + ] + }, + "UpdateRepository": { + "requestType": "UpdateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).patch": "/v1beta1/{repository.name=projects/*/locations/*/repositories/*}", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "repository,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{repository.name=projects/*/locations/*/repositories/*}", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "repository,update_mask" + } + ] + }, + "DeleteRepository": { + "requestType": "DeleteRepositoryRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "FetchRemoteBranches": { + "requestType": "FetchRemoteBranchesRequest", + "responseType": "FetchRemoteBranchesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + } + } + ] + }, + "ListWorkspaces": { + "requestType": "ListWorkspacesRequest", + "responseType": "ListWorkspacesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetWorkspace": { + "requestType": "GetWorkspaceRequest", + "responseType": "Workspace", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateWorkspace": { + "requestType": "CreateWorkspaceRequest", + "responseType": "Workspace", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces", + "(google.api.http).body": "workspace", + "(google.api.method_signature)": "parent,workspace,workspace_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces", + "body": "workspace" + } + }, + { + "(google.api.method_signature)": "parent,workspace,workspace_id" + } + ] + }, + "DeleteWorkspace": { + "requestType": "DeleteWorkspaceRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "InstallNpmPackages": { + "requestType": "InstallNpmPackagesRequest", + "responseType": "InstallNpmPackagesResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages", + "body": "*" + } + } + ] + }, + "PullGitCommits": { + "requestType": "PullGitCommitsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull", + "body": "*" + } + } + ] + }, + "PushGitCommits": { + "requestType": "PushGitCommitsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push", + "body": "*" + } + } + ] + }, + "FetchFileGitStatuses": { + "requestType": "FetchFileGitStatusesRequest", + "responseType": "FetchFileGitStatusesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + } + } + ] + }, + "FetchGitAheadBehind": { + "requestType": "FetchGitAheadBehindRequest", + "responseType": "FetchGitAheadBehindResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + } + } + ] + }, + "CommitWorkspaceChanges": { + "requestType": "CommitWorkspaceChangesRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit", + "body": "*" + } + } + ] + }, + "ResetWorkspaceChanges": { + "requestType": "ResetWorkspaceChangesRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset", + "body": "*" + } + } + ] + }, + "FetchFileDiff": { + "requestType": "FetchFileDiffRequest", + "responseType": "FetchFileDiffResponse", + "options": { + "(google.api.http).get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + } + } + ] + }, + "QueryDirectoryContents": { + "requestType": "QueryDirectoryContentsRequest", + "responseType": "QueryDirectoryContentsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + } + } + ] + }, + "MakeDirectory": { + "requestType": "MakeDirectoryRequest", + "responseType": "MakeDirectoryResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory", + "body": "*" + } + } + ] + }, + "RemoveDirectory": { + "requestType": "RemoveDirectoryRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory", + "body": "*" + } + } + ] + }, + "MoveDirectory": { + "requestType": "MoveDirectoryRequest", + "responseType": "MoveDirectoryResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory", + "body": "*" + } + } + ] + }, + "ReadFile": { + "requestType": "ReadFileRequest", + "responseType": "ReadFileResponse", + "options": { + "(google.api.http).get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + } + } + ] + }, + "RemoveFile": { + "requestType": "RemoveFileRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile", + "body": "*" + } + } + ] + }, + "MoveFile": { + "requestType": "MoveFileRequest", + "responseType": "MoveFileResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile", + "body": "*" + } + } + ] + }, + "WriteFile": { + "requestType": "WriteFileRequest", + "responseType": "WriteFileResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile", + "body": "*" + } + } + ] + }, + "ListCompilationResults": { + "requestType": "ListCompilationResultsRequest", + "responseType": "ListCompilationResultsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetCompilationResult": { + "requestType": "GetCompilationResultRequest", + "responseType": "CompilationResult", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateCompilationResult": { + "requestType": "CreateCompilationResultRequest", + "responseType": "CompilationResult", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "(google.api.http).body": "compilation_result", + "(google.api.method_signature)": "parent,compilation_result" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "body": "compilation_result" + } + }, + { + "(google.api.method_signature)": "parent,compilation_result" + } + ] + }, + "QueryCompilationResultActions": { + "requestType": "QueryCompilationResultActionsRequest", + "responseType": "QueryCompilationResultActionsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + } + } + ] + }, + "ListWorkflowInvocations": { + "requestType": "ListWorkflowInvocationsRequest", + "responseType": "ListWorkflowInvocationsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetWorkflowInvocation": { + "requestType": "GetWorkflowInvocationRequest", + "responseType": "WorkflowInvocation", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateWorkflowInvocation": { + "requestType": "CreateWorkflowInvocationRequest", + "responseType": "WorkflowInvocation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "(google.api.http).body": "workflow_invocation", + "(google.api.method_signature)": "parent,workflow_invocation" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "body": "workflow_invocation" + } + }, + { + "(google.api.method_signature)": "parent,workflow_invocation" + } + ] + }, + "DeleteWorkflowInvocation": { + "requestType": "DeleteWorkflowInvocationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelWorkflowInvocation": { + "requestType": "CancelWorkflowInvocationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel", + "body": "*" + } + } + ] + }, + "QueryWorkflowInvocationActions": { + "requestType": "QueryWorkflowInvocationActionsRequest", + "responseType": "QueryWorkflowInvocationActionsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + } + } + ] + } + } + }, + "Repository": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/Repository", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gitRemoteSettings": { + "type": "GitRemoteSettings", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "GitRemoteSettings": { + "fields": { + "url": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "defaultBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "authenticationTokenSecretVersion": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, + "tokenStatus": { + "type": "TokenStatus", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "TokenStatus": { + "values": { + "TOKEN_STATUS_UNSPECIFIED": 0, + "NOT_FOUND": 1, + "INVALID": 2, + "VALID": 3 + } + } + } + } + } + }, + "ListRepositoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListRepositoriesResponse": { + "fields": { + "repositories": { + "rule": "repeated", + "type": "Repository", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + } + } + }, + "CreateRepositoryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "repository": { + "type": "Repository", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "repositoryId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateRepositoryRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "repository": { + "type": "Repository", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "FetchRemoteBranchesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + } + } + }, + "FetchRemoteBranchesResponse": { + "fields": { + "branches": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Workspace": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/Workspace", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListWorkspacesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListWorkspacesResponse": { + "fields": { + "workspaces": { + "rule": "repeated", + "type": "Workspace", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "CreateWorkspaceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "workspace": { + "type": "Workspace", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "workspaceId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "CommitAuthor": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "emailAddress": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PullGitCommitsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "author": { + "type": "CommitAuthor", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PushGitCommitsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchFileGitStatusesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "FetchFileGitStatusesResponse": { + "fields": { + "uncommittedFileChanges": { + "rule": "repeated", + "type": "UncommittedFileChange", + "id": 1 + } + }, + "nested": { + "UncommittedFileChange": { + "fields": { + "path": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ADDED": 1, + "DELETED": 2, + "MODIFIED": 3, + "HAS_CONFLICTS": 4 + } + } + } + } + } + }, + "FetchGitAheadBehindRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchGitAheadBehindResponse": { + "fields": { + "commitsAhead": { + "type": "int32", + "id": 1 + }, + "commitsBehind": { + "type": "int32", + "id": 2 + } + } + }, + "CommitWorkspaceChangesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "author": { + "type": "CommitAuthor", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "commitMessage": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ResetWorkspaceChangesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clean": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchFileDiffRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FetchFileDiffResponse": { + "fields": { + "formattedDiff": { + "type": "string", + "id": 1 + } + } + }, + "QueryDirectoryContentsRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryDirectoryContentsResponse": { + "fields": { + "directoryEntries": { + "rule": "repeated", + "type": "DirectoryEntry", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + }, + "nested": { + "DirectoryEntry": { + "oneofs": { + "entry": { + "oneof": [ + "file", + "directory" + ] + } + }, + "fields": { + "file": { + "type": "string", + "id": 1 + }, + "directory": { + "type": "string", + "id": 2 + } + } + } + } + }, + "MakeDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MakeDirectoryResponse": { + "fields": {} + }, + "RemoveDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "newPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveDirectoryResponse": { + "fields": {} + }, + "ReadFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ReadFileResponse": { + "fields": { + "fileContents": { + "type": "bytes", + "id": 1 + } + } + }, + "RemoveFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "newPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveFileResponse": { + "fields": {} + }, + "WriteFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "contents": { + "type": "bytes", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WriteFileResponse": { + "fields": {} + }, + "InstallNpmPackagesRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "InstallNpmPackagesResponse": { + "fields": {} + }, + "CompilationResult": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/CompilationResult", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}" + }, + "oneofs": { + "source": { + "oneof": [ + "gitCommitish", + "workspace" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gitCommitish": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "workspace": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "codeCompilationConfig": { + "type": "CodeCompilationConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataformCoreVersion": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compilationErrors": { + "rule": "repeated", + "type": "CompilationError", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "CodeCompilationConfig": { + "fields": { + "defaultDatabase": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "defaultSchema": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "defaultLocation": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "assertionSchema": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "vars": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "databaseSuffix": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schemaSuffix": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tablePrefix": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CompilationError": { + "fields": { + "message": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stack": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "path": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "actionTarget": { + "type": "Target", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "ListCompilationResultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCompilationResultsResponse": { + "fields": { + "compilationResults": { + "rule": "repeated", + "type": "CompilationResult", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetCompilationResultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + } + } + }, + "CreateCompilationResultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "compilationResult": { + "type": "CompilationResult", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Target": { + "fields": { + "database": { + "type": "string", + "id": 1 + }, + "schema": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "RelationDescriptor": { + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "columns": { + "rule": "repeated", + "type": "ColumnDescriptor", + "id": 2 + }, + "bigqueryLabels": { + "keyType": "string", + "type": "string", + "id": 3 + } + }, + "nested": { + "ColumnDescriptor": { + "fields": { + "path": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "bigqueryPolicyTags": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + } + } + }, + "CompilationResultAction": { + "oneofs": { + "compiledObject": { + "oneof": [ + "relation", + "operations", + "assertion", + "declaration" + ] + } + }, + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "canonicalTarget": { + "type": "Target", + "id": 2 + }, + "filePath": { + "type": "string", + "id": 3 + }, + "relation": { + "type": "Relation", + "id": 4 + }, + "operations": { + "type": "Operations", + "id": 5 + }, + "assertion": { + "type": "Assertion", + "id": 6 + }, + "declaration": { + "type": "Declaration", + "id": 7 + } + }, + "nested": { + "Relation": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 4 + }, + "relationType": { + "type": "RelationType", + "id": 5 + }, + "selectQuery": { + "type": "string", + "id": 6 + }, + "preOperations": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "postOperations": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "incrementalTableConfig": { + "type": "IncrementalTableConfig", + "id": 9 + }, + "partitionExpression": { + "type": "string", + "id": 10 + }, + "clusterExpressions": { + "rule": "repeated", + "type": "string", + "id": 11 + }, + "partitionExpirationDays": { + "type": "int32", + "id": 12 + }, + "requirePartitionFilter": { + "type": "bool", + "id": 13 + }, + "additionalOptions": { + "keyType": "string", + "type": "string", + "id": 14 + } + }, + "nested": { + "RelationType": { + "values": { + "RELATION_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "VIEW": 2, + "INCREMENTAL_TABLE": 3, + "MATERIALIZED_VIEW": 4 + } + }, + "IncrementalTableConfig": { + "fields": { + "incrementalSelectQuery": { + "type": "string", + "id": 1 + }, + "refreshDisabled": { + "type": "bool", + "id": 2 + }, + "uniqueKeyParts": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "updatePartitionFilter": { + "type": "string", + "id": 4 + }, + "incrementalPreOperations": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "incrementalPostOperations": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "Operations": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 6 + }, + "queries": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "hasOutput": { + "type": "bool", + "id": 5 + } + } + }, + "Assertion": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "parentAction": { + "type": "Target", + "id": 5 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "selectQuery": { + "type": "string", + "id": 4 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 6 + } + } + }, + "Declaration": { + "fields": { + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 1 + } + } + } + } + }, + "QueryCompilationResultActionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryCompilationResultActionsResponse": { + "fields": { + "compilationResultActions": { + "rule": "repeated", + "type": "CompilationResultAction", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "WorkflowInvocation": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/WorkflowInvocation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compilationResult": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + }, + "invocationConfig": { + "type": "InvocationConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "invocationTiming": { + "type": "google.type.Interval", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "InvocationConfig": { + "fields": { + "includedTargets": { + "rule": "repeated", + "type": "Target", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "includedTags": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "transitiveDependenciesIncluded": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "transitiveDependentsIncluded": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "fullyRefreshIncrementalTablesEnabled": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "CANCELLED": 3, + "FAILED": 4, + "CANCELING": 5 + } + } + } + }, + "ListWorkflowInvocationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListWorkflowInvocationsResponse": { + "fields": { + "workflowInvocations": { + "rule": "repeated", + "type": "WorkflowInvocation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "CreateWorkflowInvocationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "workflowInvocation": { + "type": "WorkflowInvocation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "CancelWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "WorkflowInvocationAction": { + "fields": { + "target": { + "type": "Target", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "canonicalTarget": { + "type": "Target", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failureReason": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "invocationTiming": { + "type": "google.type.Interval", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bigqueryAction": { + "type": "BigQueryAction", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "PENDING": 0, + "RUNNING": 1, + "SKIPPED": 2, + "DISABLED": 3, + "SUCCEEDED": 4, + "CANCELLED": 5, + "FAILED": 6 + } + }, + "BigQueryAction": { + "fields": { + "sqlScript": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "QueryWorkflowInvocationActionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryWorkflowInvocationActionsResponse": { + "fields": { + "workflowInvocationActions": { + "rule": "repeated", + "type": "WorkflowInvocationAction", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "string", + "id": 13 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/interval;interval", + "java_multiple_files": true, + "java_outer_classname": "IntervalProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Interval": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-dataform/samples/README.md b/packages/google-cloud-dataform/samples/README.md new file mode 100644 index 00000000000..e1b05f2171d --- /dev/null +++ b/packages/google-cloud-dataform/samples/README.md @@ -0,0 +1,1364 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Dataform API: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Dataform.cancel_workflow_invocation](#dataform.cancel_workflow_invocation) + * [Dataform.commit_workspace_changes](#dataform.commit_workspace_changes) + * [Dataform.create_compilation_result](#dataform.create_compilation_result) + * [Dataform.create_repository](#dataform.create_repository) + * [Dataform.create_workflow_invocation](#dataform.create_workflow_invocation) + * [Dataform.create_workspace](#dataform.create_workspace) + * [Dataform.delete_repository](#dataform.delete_repository) + * [Dataform.delete_workflow_invocation](#dataform.delete_workflow_invocation) + * [Dataform.delete_workspace](#dataform.delete_workspace) + * [Dataform.fetch_file_diff](#dataform.fetch_file_diff) + * [Dataform.fetch_file_git_statuses](#dataform.fetch_file_git_statuses) + * [Dataform.fetch_git_ahead_behind](#dataform.fetch_git_ahead_behind) + * [Dataform.fetch_remote_branches](#dataform.fetch_remote_branches) + * [Dataform.get_compilation_result](#dataform.get_compilation_result) + * [Dataform.get_repository](#dataform.get_repository) + * [Dataform.get_workflow_invocation](#dataform.get_workflow_invocation) + * [Dataform.get_workspace](#dataform.get_workspace) + * [Dataform.install_npm_packages](#dataform.install_npm_packages) + * [Dataform.list_compilation_results](#dataform.list_compilation_results) + * [Dataform.list_repositories](#dataform.list_repositories) + * [Dataform.list_workflow_invocations](#dataform.list_workflow_invocations) + * [Dataform.list_workspaces](#dataform.list_workspaces) + * [Dataform.make_directory](#dataform.make_directory) + * [Dataform.move_directory](#dataform.move_directory) + * [Dataform.move_file](#dataform.move_file) + * [Dataform.pull_git_commits](#dataform.pull_git_commits) + * [Dataform.push_git_commits](#dataform.push_git_commits) + * [Dataform.query_compilation_result_actions](#dataform.query_compilation_result_actions) + * [Dataform.query_directory_contents](#dataform.query_directory_contents) + * [Dataform.query_workflow_invocation_actions](#dataform.query_workflow_invocation_actions) + * [Dataform.read_file](#dataform.read_file) + * [Dataform.remove_directory](#dataform.remove_directory) + * [Dataform.remove_file](#dataform.remove_file) + * [Dataform.reset_workspace_changes](#dataform.reset_workspace_changes) + * [Dataform.update_repository](#dataform.update_repository) + * [Dataform.write_file](#dataform.write_file) + * [Dataform.cancel_workflow_invocation](#dataform.cancel_workflow_invocation) + * [Dataform.commit_workspace_changes](#dataform.commit_workspace_changes) + * [Dataform.create_compilation_result](#dataform.create_compilation_result) + * [Dataform.create_repository](#dataform.create_repository) + * [Dataform.create_workflow_invocation](#dataform.create_workflow_invocation) + * [Dataform.create_workspace](#dataform.create_workspace) + * [Dataform.delete_repository](#dataform.delete_repository) + * [Dataform.delete_workflow_invocation](#dataform.delete_workflow_invocation) + * [Dataform.delete_workspace](#dataform.delete_workspace) + * [Dataform.fetch_file_diff](#dataform.fetch_file_diff) + * [Dataform.fetch_file_git_statuses](#dataform.fetch_file_git_statuses) + * [Dataform.fetch_git_ahead_behind](#dataform.fetch_git_ahead_behind) + * [Dataform.fetch_remote_branches](#dataform.fetch_remote_branches) + * [Dataform.get_compilation_result](#dataform.get_compilation_result) + * [Dataform.get_repository](#dataform.get_repository) + * [Dataform.get_workflow_invocation](#dataform.get_workflow_invocation) + * [Dataform.get_workspace](#dataform.get_workspace) + * [Dataform.install_npm_packages](#dataform.install_npm_packages) + * [Dataform.list_compilation_results](#dataform.list_compilation_results) + * [Dataform.list_repositories](#dataform.list_repositories) + * [Dataform.list_workflow_invocations](#dataform.list_workflow_invocations) + * [Dataform.list_workspaces](#dataform.list_workspaces) + * [Dataform.make_directory](#dataform.make_directory) + * [Dataform.move_directory](#dataform.move_directory) + * [Dataform.move_file](#dataform.move_file) + * [Dataform.pull_git_commits](#dataform.pull_git_commits) + * [Dataform.push_git_commits](#dataform.push_git_commits) + * [Dataform.query_compilation_result_actions](#dataform.query_compilation_result_actions) + * [Dataform.query_directory_contents](#dataform.query_directory_contents) + * [Dataform.query_workflow_invocation_actions](#dataform.query_workflow_invocation_actions) + * [Dataform.read_file](#dataform.read_file) + * [Dataform.remove_directory](#dataform.remove_directory) + * [Dataform.remove_file](#dataform.remove_file) + * [Dataform.reset_workspace_changes](#dataform.reset_workspace_changes) + * [Dataform.update_repository](#dataform.update_repository) + * [Dataform.write_file](#dataform.write_file) + * [Quickstart](#quickstart) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Dataform.cancel_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js` + + +----- + + + + +### Dataform.commit_workspace_changes + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js` + + +----- + + + + +### Dataform.create_compilation_result + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js` + + +----- + + + + +### Dataform.create_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js` + + +----- + + + + +### Dataform.create_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js` + + +----- + + + + +### Dataform.create_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js` + + +----- + + + + +### Dataform.delete_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js` + + +----- + + + + +### Dataform.delete_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js` + + +----- + + + + +### Dataform.delete_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js` + + +----- + + + + +### Dataform.fetch_file_diff + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js` + + +----- + + + + +### Dataform.fetch_file_git_statuses + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js` + + +----- + + + + +### Dataform.fetch_git_ahead_behind + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js` + + +----- + + + + +### Dataform.fetch_remote_branches + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js` + + +----- + + + + +### Dataform.get_compilation_result + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js` + + +----- + + + + +### Dataform.get_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js` + + +----- + + + + +### Dataform.get_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js` + + +----- + + + + +### Dataform.get_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js` + + +----- + + + + +### Dataform.install_npm_packages + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js` + + +----- + + + + +### Dataform.list_compilation_results + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js` + + +----- + + + + +### Dataform.list_repositories + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js` + + +----- + + + + +### Dataform.list_workflow_invocations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js` + + +----- + + + + +### Dataform.list_workspaces + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js` + + +----- + + + + +### Dataform.make_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js` + + +----- + + + + +### Dataform.move_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js` + + +----- + + + + +### Dataform.move_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js` + + +----- + + + + +### Dataform.pull_git_commits + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js` + + +----- + + + + +### Dataform.push_git_commits + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js` + + +----- + + + + +### Dataform.query_compilation_result_actions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js` + + +----- + + + + +### Dataform.query_directory_contents + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js` + + +----- + + + + +### Dataform.query_workflow_invocation_actions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js` + + +----- + + + + +### Dataform.read_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js` + + +----- + + + + +### Dataform.remove_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js` + + +----- + + + + +### Dataform.remove_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js` + + +----- + + + + +### Dataform.reset_workspace_changes + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js` + + +----- + + + + +### Dataform.update_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js` + + +----- + + + + +### Dataform.write_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js` + + +----- + + + + +### Dataform.cancel_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js` + + +----- + + + + +### Dataform.commit_workspace_changes + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js` + + +----- + + + + +### Dataform.create_compilation_result + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js` + + +----- + + + + +### Dataform.create_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js` + + +----- + + + + +### Dataform.create_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js` + + +----- + + + + +### Dataform.create_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js` + + +----- + + + + +### Dataform.delete_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js` + + +----- + + + + +### Dataform.delete_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js` + + +----- + + + + +### Dataform.delete_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js` + + +----- + + + + +### Dataform.fetch_file_diff + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js` + + +----- + + + + +### Dataform.fetch_file_git_statuses + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js` + + +----- + + + + +### Dataform.fetch_git_ahead_behind + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js` + + +----- + + + + +### Dataform.fetch_remote_branches + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js` + + +----- + + + + +### Dataform.get_compilation_result + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js` + + +----- + + + + +### Dataform.get_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js` + + +----- + + + + +### Dataform.get_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js` + + +----- + + + + +### Dataform.get_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js` + + +----- + + + + +### Dataform.install_npm_packages + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js` + + +----- + + + + +### Dataform.list_compilation_results + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js` + + +----- + + + + +### Dataform.list_repositories + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js` + + +----- + + + + +### Dataform.list_workflow_invocations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js` + + +----- + + + + +### Dataform.list_workspaces + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js` + + +----- + + + + +### Dataform.make_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js` + + +----- + + + + +### Dataform.move_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js` + + +----- + + + + +### Dataform.move_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js` + + +----- + + + + +### Dataform.pull_git_commits + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js` + + +----- + + + + +### Dataform.push_git_commits + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js` + + +----- + + + + +### Dataform.query_compilation_result_actions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js` + + +----- + + + + +### Dataform.query_directory_contents + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js` + + +----- + + + + +### Dataform.query_workflow_invocation_actions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js` + + +----- + + + + +### Dataform.read_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js` + + +----- + + + + +### Dataform.remove_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js` + + +----- + + + + +### Dataform.remove_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js` + + +----- + + + + +### Dataform.reset_workspace_changes + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js` + + +----- + + + + +### Dataform.update_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js` + + +----- + + + + +### Dataform.write_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/quickstart.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/test/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/test/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/test/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://dataform.co/ diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js new file mode 100644 index 00000000000..4aff9deaf76 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_CancelWorkflowInvocation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCancelWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.cancelWorkflowInvocation(request); + console.log(response); + } + + callCancelWorkflowInvocation(); + // [END dataform_v1alpha2_generated_Dataform_CancelWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js new file mode 100644 index 00000000000..d56a4bc7ea2 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js @@ -0,0 +1,75 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, author) { + // [START dataform_v1alpha2_generated_Dataform_CommitWorkspaceChanges_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Required. The commit's author. + */ + // const author = {} + /** + * Optional. The commit's message. + */ + // const commitMessage = 'abc123' + /** + * Optional. Full file paths to commit including filename, rooted at workspace root. If + * left empty, all files will be committed. + */ + // const paths = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCommitWorkspaceChanges() { + // Construct request + const request = { + name, + author, + }; + + // Run request + const response = await dataformClient.commitWorkspaceChanges(request); + console.log(response); + } + + callCommitWorkspaceChanges(); + // [END dataform_v1alpha2_generated_Dataform_CommitWorkspaceChanges_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js new file mode 100644 index 00000000000..5e42038a52d --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, compilationResult) { + // [START dataform_v1alpha2_generated_Dataform_CreateCompilationResult_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the compilation result. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The compilation result to create. + */ + // const compilationResult = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateCompilationResult() { + // Construct request + const request = { + parent, + compilationResult, + }; + + // Run request + const response = await dataformClient.createCompilationResult(request); + console.log(response); + } + + callCreateCompilationResult(); + // [END dataform_v1alpha2_generated_Dataform_CreateCompilationResult_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js new file mode 100644 index 00000000000..c6eeb686011 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js @@ -0,0 +1,73 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, repository, repositoryId) { + // [START dataform_v1alpha2_generated_Dataform_CreateRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The location in which to create the repository. Must be in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. The repository to create. + */ + // const repository = {} + /** + * Required. The ID to use for the repository, which will become the final component of + * the repository's resource name. + */ + // const repositoryId = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateRepository() { + // Construct request + const request = { + parent, + repository, + repositoryId, + }; + + // Run request + const response = await dataformClient.createRepository(request); + console.log(response); + } + + callCreateRepository(); + // [END dataform_v1alpha2_generated_Dataform_CreateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js new file mode 100644 index 00000000000..df46f246f63 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, workflowInvocation) { + // [START dataform_v1alpha2_generated_Dataform_CreateWorkflowInvocation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the WorkflowInvocation type. + */ + // const parent = 'abc123' + /** + * Required. The workflow invocation resource to create. + */ + // const workflowInvocation = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateWorkflowInvocation() { + // Construct request + const request = { + parent, + workflowInvocation, + }; + + // Run request + const response = await dataformClient.createWorkflowInvocation(request); + console.log(response); + } + + callCreateWorkflowInvocation(); + // [END dataform_v1alpha2_generated_Dataform_CreateWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js new file mode 100644 index 00000000000..b04b2cd474a --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js @@ -0,0 +1,73 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, workspace, workspaceId) { + // [START dataform_v1alpha2_generated_Dataform_CreateWorkspace_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the workspace. Must be in the format + * `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The workspace to create. + */ + // const workspace = {} + /** + * Required. The ID to use for the workspace, which will become the final component of + * the workspace's resource name. + */ + // const workspaceId = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateWorkspace() { + // Construct request + const request = { + parent, + workspace, + workspaceId, + }; + + // Run request + const response = await dataformClient.createWorkspace(request); + console.log(response); + } + + callCreateWorkspace(); + // [END dataform_v1alpha2_generated_Dataform_CreateWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js new file mode 100644 index 00000000000..ae1ff8c3410 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_DeleteRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + /** + * If set to true, any child resources of this repository will also be + * deleted. (Otherwise, the request will only succeed if the repository has no + * child resources.) + */ + // const force = true + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteRepository(request); + console.log(response); + } + + callDeleteRepository(); + // [END dataform_v1alpha2_generated_Dataform_DeleteRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js new file mode 100644 index 00000000000..0e7dddcd802 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_DeleteWorkflowInvocation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteWorkflowInvocation(request); + console.log(response); + } + + callDeleteWorkflowInvocation(); + // [END dataform_v1alpha2_generated_Dataform_DeleteWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js new file mode 100644 index 00000000000..dcb19203dd9 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_DeleteWorkspace_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteWorkspace(request); + console.log(response); + } + + callDeleteWorkspace(); + // [END dataform_v1alpha2_generated_Dataform_DeleteWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js new file mode 100644 index 00000000000..8b9ef68d8e9 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1alpha2_generated_Dataform_FetchFileDiff_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchFileDiff() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.fetchFileDiff(request); + console.log(response); + } + + callFetchFileDiff(); + // [END dataform_v1alpha2_generated_Dataform_FetchFileDiff_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js new file mode 100644 index 00000000000..f14f636d586 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_FetchFileGitStatuses_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchFileGitStatuses() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchFileGitStatuses(request); + console.log(response); + } + + callFetchFileGitStatuses(); + // [END dataform_v1alpha2_generated_Dataform_FetchFileGitStatuses_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js new file mode 100644 index 00000000000..f03c884aff3 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_FetchGitAheadBehind_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote against which this workspace + * should be compared. If left unset, the repository's default branch name + * will be used. + */ + // const remoteBranch = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchGitAheadBehind() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchGitAheadBehind(request); + console.log(response); + } + + callFetchGitAheadBehind(); + // [END dataform_v1alpha2_generated_Dataform_FetchGitAheadBehind_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js new file mode 100644 index 00000000000..83f7f0b4811 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_FetchRemoteBranches_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchRemoteBranches() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchRemoteBranches(request); + console.log(response); + } + + callFetchRemoteBranches(); + // [END dataform_v1alpha2_generated_Dataform_FetchRemoteBranches_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js new file mode 100644 index 00000000000..3ba63ec7682 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_GetCompilationResult_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The compilation result's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetCompilationResult() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getCompilationResult(request); + console.log(response); + } + + callGetCompilationResult(); + // [END dataform_v1alpha2_generated_Dataform_GetCompilationResult_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js new file mode 100644 index 00000000000..bcfe43b87ee --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_GetRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getRepository(request); + console.log(response); + } + + callGetRepository(); + // [END dataform_v1alpha2_generated_Dataform_GetRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js new file mode 100644 index 00000000000..1541c2d3d7b --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_GetWorkflowInvocation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getWorkflowInvocation(request); + console.log(response); + } + + callGetWorkflowInvocation(); + // [END dataform_v1alpha2_generated_Dataform_GetWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js new file mode 100644 index 00000000000..04d8270ddd0 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_GetWorkspace_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getWorkspace(request); + console.log(response); + } + + callGetWorkspace(); + // [END dataform_v1alpha2_generated_Dataform_GetWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js new file mode 100644 index 00000000000..61471cd886a --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace) { + // [START dataform_v1alpha2_generated_Dataform_InstallNpmPackages_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callInstallNpmPackages() { + // Construct request + const request = { + workspace, + }; + + // Run request + const response = await dataformClient.installNpmPackages(request); + console.log(response); + } + + callInstallNpmPackages(); + // [END dataform_v1alpha2_generated_Dataform_InstallNpmPackages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js new file mode 100644 index 00000000000..b84d4c4fc38 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js @@ -0,0 +1,77 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1alpha2_generated_Dataform_ListCompilationResults_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListCompilationResults() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listCompilationResultsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCompilationResults(); + // [END dataform_v1alpha2_generated_Dataform_ListCompilationResults_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js new file mode 100644 index 00000000000..9ec45e2e19e --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js @@ -0,0 +1,87 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1alpha2_generated_Dataform_ListRepositories_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + */ + // const orderBy = 'abc123' + /** + * Optional. Filter for the returned list. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListRepositories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listRepositoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRepositories(); + // [END dataform_v1alpha2_generated_Dataform_ListRepositories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js new file mode 100644 index 00000000000..95d7d131454 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js @@ -0,0 +1,77 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1alpha2_generated_Dataform_ListWorkflowInvocations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListWorkflowInvocations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listWorkflowInvocationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkflowInvocations(); + // [END dataform_v1alpha2_generated_Dataform_ListWorkflowInvocations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js new file mode 100644 index 00000000000..78a7f1896d6 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js @@ -0,0 +1,87 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1alpha2_generated_Dataform_ListWorkspaces_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + */ + // const orderBy = 'abc123' + /** + * Optional. Filter for the returned list. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListWorkspaces() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listWorkspacesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkspaces(); + // [END dataform_v1alpha2_generated_Dataform_ListWorkspaces_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js new file mode 100644 index 00000000000..97fd6ce27c4 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1alpha2_generated_Dataform_MakeDirectory_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMakeDirectory() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.makeDirectory(request); + console.log(response); + } + + callMakeDirectory(); + // [END dataform_v1alpha2_generated_Dataform_MakeDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js new file mode 100644 index 00000000000..0badfd07c00 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js @@ -0,0 +1,73 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, newPath) { + // [START dataform_v1alpha2_generated_Dataform_MoveDirectory_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + /** + * Required. The new path for the directory including directory name, rooted at + * workspace root. + */ + // const newPath = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMoveDirectory() { + // Construct request + const request = { + workspace, + path, + newPath, + }; + + // Run request + const response = await dataformClient.moveDirectory(request); + console.log(response); + } + + callMoveDirectory(); + // [END dataform_v1alpha2_generated_Dataform_MoveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js new file mode 100644 index 00000000000..5a2e81b7add --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, newPath) { + // [START dataform_v1alpha2_generated_Dataform_MoveFile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + /** + * Required. The file's new path including filename, relative to the workspace root. + */ + // const newPath = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMoveFile() { + // Construct request + const request = { + workspace, + path, + newPath, + }; + + // Run request + const response = await dataformClient.moveFile(request); + console.log(response); + } + + callMoveFile(); + // [END dataform_v1alpha2_generated_Dataform_MoveFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js new file mode 100644 index 00000000000..d4341d3e356 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js @@ -0,0 +1,72 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, author) { + // [START dataform_v1alpha2_generated_Dataform_PullGitCommits_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote from which to pull commits. + * If left unset, the repository's default branch name will be used. + */ + // const remoteBranch = 'abc123' + /** + * Required. The author of any merge commit which may be created as a result of merging + * fetched Git commits into this workspace. + */ + // const author = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callPullGitCommits() { + // Construct request + const request = { + name, + author, + }; + + // Run request + const response = await dataformClient.pullGitCommits(request); + console.log(response); + } + + callPullGitCommits(); + // [END dataform_v1alpha2_generated_Dataform_PullGitCommits_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js new file mode 100644 index 00000000000..2589d00cbeb --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_PushGitCommits_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote to which commits should be pushed. + * If left unset, the repository's default branch name will be used. + */ + // const remoteBranch = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callPushGitCommits() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.pushGitCommits(request); + console.log(response); + } + + callPushGitCommits(); + // [END dataform_v1alpha2_generated_Dataform_PushGitCommits_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js new file mode 100644 index 00000000000..6e1c256c936 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js @@ -0,0 +1,82 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_QueryCompilationResultActions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The compilation result's name. + */ + // const name = 'abc123' + /** + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryCompilationResultActions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await dataformClient.queryCompilationResultActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryCompilationResultActions(); + // [END dataform_v1alpha2_generated_Dataform_QueryCompilationResultActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js new file mode 100644 index 00000000000..5107e214f81 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js @@ -0,0 +1,82 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace) { + // [START dataform_v1alpha2_generated_Dataform_QueryDirectoryContents_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + */ + // const path = 'abc123' + /** + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryDirectoryContents() { + // Construct request + const request = { + workspace, + }; + + // Run request + const iterable = await dataformClient.queryDirectoryContentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryDirectoryContents(); + // [END dataform_v1alpha2_generated_Dataform_QueryDirectoryContents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js new file mode 100644 index 00000000000..cd92923c1c9 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js @@ -0,0 +1,77 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_QueryWorkflowInvocationActions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation's name. + */ + // const name = 'abc123' + /** + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryWorkflowInvocationActions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await dataformClient.queryWorkflowInvocationActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryWorkflowInvocationActions(); + // [END dataform_v1alpha2_generated_Dataform_QueryWorkflowInvocationActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js new file mode 100644 index 00000000000..7d3c2ba47c0 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1alpha2_generated_Dataform_ReadFile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callReadFile() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.readFile(request); + console.log(response); + } + + callReadFile(); + // [END dataform_v1alpha2_generated_Dataform_ReadFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js new file mode 100644 index 00000000000..a0709f9592d --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1alpha2_generated_Dataform_RemoveDirectory_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callRemoveDirectory() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.removeDirectory(request); + console.log(response); + } + + callRemoveDirectory(); + // [END dataform_v1alpha2_generated_Dataform_RemoveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js new file mode 100644 index 00000000000..31b54701307 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1alpha2_generated_Dataform_RemoveFile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callRemoveFile() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.removeFile(request); + console.log(response); + } + + callRemoveFile(); + // [END dataform_v1alpha2_generated_Dataform_RemoveFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js new file mode 100644 index 00000000000..4179d277bbf --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js @@ -0,0 +1,70 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_ResetWorkspaceChanges_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. Full file paths to reset back to their committed state including filename, + * rooted at workspace root. If left empty, all files will be reset. + */ + // const paths = 'abc123' + /** + * Optional. If set to true, untracked files will be deleted. + */ + // const clean = true + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callResetWorkspaceChanges() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.resetWorkspaceChanges(request); + console.log(response); + } + + callResetWorkspaceChanges(); + // [END dataform_v1alpha2_generated_Dataform_ResetWorkspaceChanges_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js new file mode 100644 index 00000000000..3c7c3636f98 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(repository) { + // [START dataform_v1alpha2_generated_Dataform_UpdateRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. Specifies the fields to be updated in the repository. If left unset, + * all fields will be updated. + */ + // const updateMask = {} + /** + * Required. The repository to update. + */ + // const repository = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callUpdateRepository() { + // Construct request + const request = { + repository, + }; + + // Run request + const response = await dataformClient.updateRepository(request); + console.log(response); + } + + callUpdateRepository(); + // [END dataform_v1alpha2_generated_Dataform_UpdateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js new file mode 100644 index 00000000000..d8305c71258 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, contents) { + // [START dataform_v1alpha2_generated_Dataform_WriteFile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file. + */ + // const path = 'abc123' + /** + * Required. The file's contents. + */ + // const contents = 'Buffer.from('string')' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callWriteFile() { + // Construct request + const request = { + workspace, + path, + contents, + }; + + // Run request + const response = await dataformClient.writeFile(request); + console.log(response); + } + + callWriteFile(); + // [END dataform_v1alpha2_generated_Dataform_WriteFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json new file mode 100644 index 00000000000..33b4e90044a --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json @@ -0,0 +1,1647 @@ +{ + "clientLibrary": { + "name": "nodejs-dataform", + "version": "0.4.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.dataform.v1alpha2", + "version": "v1alpha2" + } + ] + }, + "snippets": [ + { + "regionTag": "dataform_v1alpha2_generated_Dataform_ListRepositories_async", + "title": "Dataform listRepositories Sample", + "origin": "API_DEFINITION", + "description": " Lists Repositories in a given project and location.", + "canonical": true, + "file": "dataform.list_repositories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRepositories", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListRepositories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.ListRepositoriesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "ListRepositories", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListRepositories", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_GetRepository_async", + "title": "Dataform getRepository Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single Repository.", + "canonical": true, + "file": "dataform.get_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "GetRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_CreateRepository_async", + "title": "Dataform createRepository Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Repository in a given project and location.", + "canonical": true, + "file": "dataform.create_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateRepository", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "repository", + "type": ".google.cloud.dataform.v1alpha2.Repository" + }, + { + "name": "repository_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "CreateRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_UpdateRepository_async", + "title": "Dataform updateRepository Sample", + "origin": "API_DEFINITION", + "description": " Updates a single Repository.", + "canonical": true, + "file": "dataform.update_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.UpdateRepository", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "repository", + "type": ".google.cloud.dataform.v1alpha2.Repository" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "UpdateRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.UpdateRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_DeleteRepository_async", + "title": "Dataform deleteRepository Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Repository.", + "canonical": true, + "file": "dataform.delete_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.DeleteRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "DeleteRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.DeleteRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_FetchRemoteBranches_async", + "title": "Dataform fetchRemoteBranches Sample", + "origin": "API_DEFINITION", + "description": " Fetches a Repository's remote branches.", + "canonical": true, + "file": "dataform.fetch_remote_branches.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchRemoteBranches", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchRemoteBranches", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "FetchRemoteBranches", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchRemoteBranches", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_ListWorkspaces_async", + "title": "Dataform listWorkspaces Sample", + "origin": "API_DEFINITION", + "description": " Lists Workspaces in a given Repository.", + "canonical": true, + "file": "dataform.list_workspaces.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkspaces", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListWorkspaces", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.ListWorkspacesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "ListWorkspaces", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListWorkspaces", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_GetWorkspace_async", + "title": "Dataform getWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single Workspace.", + "canonical": true, + "file": "dataform.get_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetWorkspace", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.Workspace", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "GetWorkspace", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_CreateWorkspace_async", + "title": "Dataform createWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Workspace in a given Repository.", + "canonical": true, + "file": "dataform.create_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateWorkspace", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateWorkspace", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "workspace", + "type": ".google.cloud.dataform.v1alpha2.Workspace" + }, + { + "name": "workspace_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.Workspace", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "CreateWorkspace", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_DeleteWorkspace_async", + "title": "Dataform deleteWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Workspace.", + "canonical": true, + "file": "dataform.delete_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteWorkspace", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.DeleteWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "DeleteWorkspace", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.DeleteWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_InstallNpmPackages_async", + "title": "Dataform installNpmPackages Sample", + "origin": "API_DEFINITION", + "description": " Installs dependency NPM packages (inside a Workspace).", + "canonical": true, + "file": "dataform.install_npm_packages.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "InstallNpmPackages", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.InstallNpmPackages", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "InstallNpmPackages", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.InstallNpmPackages", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_PullGitCommits_async", + "title": "Dataform pullGitCommits Sample", + "origin": "API_DEFINITION", + "description": " Pulls Git commits from the Repository's remote into a Workspace.", + "canonical": true, + "file": "dataform.pull_git_commits.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PullGitCommits", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.PullGitCommits", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + }, + { + "name": "author", + "type": ".google.cloud.dataform.v1alpha2.CommitAuthor" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "PullGitCommits", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.PullGitCommits", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_PushGitCommits_async", + "title": "Dataform pushGitCommits Sample", + "origin": "API_DEFINITION", + "description": " Pushes Git commits from a Workspace to the Repository's remote.", + "canonical": true, + "file": "dataform.push_git_commits.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PushGitCommits", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.PushGitCommits", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "PushGitCommits", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.PushGitCommits", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_FetchFileGitStatuses_async", + "title": "Dataform fetchFileGitStatuses Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git statuses for the files in a Workspace.", + "canonical": true, + "file": "dataform.fetch_file_git_statuses.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchFileGitStatuses", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchFileGitStatuses", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "FetchFileGitStatuses", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchFileGitStatuses", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_FetchGitAheadBehind_async", + "title": "Dataform fetchGitAheadBehind Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git ahead/behind against a remote branch.", + "canonical": true, + "file": "dataform.fetch_git_ahead_behind.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchGitAheadBehind", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchGitAheadBehind", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "FetchGitAheadBehind", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchGitAheadBehind", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_CommitWorkspaceChanges_async", + "title": "Dataform commitWorkspaceChanges Sample", + "origin": "API_DEFINITION", + "description": " Applies a Git commit for uncommitted files in a Workspace.", + "canonical": true, + "file": "dataform.commit_workspace_changes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CommitWorkspaceChanges", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CommitWorkspaceChanges", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "author", + "type": ".google.cloud.dataform.v1alpha2.CommitAuthor" + }, + { + "name": "commit_message", + "type": "TYPE_STRING" + }, + { + "name": "paths", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "CommitWorkspaceChanges", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CommitWorkspaceChanges", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_ResetWorkspaceChanges_async", + "title": "Dataform resetWorkspaceChanges Sample", + "origin": "API_DEFINITION", + "description": " Performs a Git reset for uncommitted files in a Workspace.", + "canonical": true, + "file": "dataform.reset_workspace_changes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ResetWorkspaceChanges", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ResetWorkspaceChanges", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "paths", + "type": "TYPE_STRING[]" + }, + { + "name": "clean", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "ResetWorkspaceChanges", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ResetWorkspaceChanges", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_FetchFileDiff_async", + "title": "Dataform fetchFileDiff Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git diff for an uncommitted file in a Workspace.", + "canonical": true, + "file": "dataform.fetch_file_diff.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchFileDiff", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchFileDiff", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.FetchFileDiffResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "FetchFileDiff", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchFileDiff", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_QueryDirectoryContents_async", + "title": "Dataform queryDirectoryContents Sample", + "origin": "API_DEFINITION", + "description": " Returns the contents of a given Workspace directory.", + "canonical": true, + "file": "dataform.query_directory_contents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryDirectoryContents", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.QueryDirectoryContents", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "QueryDirectoryContents", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.QueryDirectoryContents", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_MakeDirectory_async", + "title": "Dataform makeDirectory Sample", + "origin": "API_DEFINITION", + "description": " Creates a directory inside a Workspace.", + "canonical": true, + "file": "dataform.make_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MakeDirectory", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.MakeDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.MakeDirectoryResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "MakeDirectory", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.MakeDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_RemoveDirectory_async", + "title": "Dataform removeDirectory Sample", + "origin": "API_DEFINITION", + "description": " Deletes a directory (inside a Workspace) and all of its contents.", + "canonical": true, + "file": "dataform.remove_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveDirectory", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.RemoveDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "RemoveDirectory", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.RemoveDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_MoveDirectory_async", + "title": "Dataform moveDirectory Sample", + "origin": "API_DEFINITION", + "description": " Moves a directory (inside a Workspace), and all of its contents, to a new location.", + "canonical": true, + "file": "dataform.move_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MoveDirectory", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.MoveDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "new_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.MoveDirectoryResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "MoveDirectory", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.MoveDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_ReadFile_async", + "title": "Dataform readFile Sample", + "origin": "API_DEFINITION", + "description": " Returns the contents of a file (inside a Workspace).", + "canonical": true, + "file": "dataform.read_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ReadFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.ReadFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "ReadFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ReadFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_RemoveFile_async", + "title": "Dataform removeFile Sample", + "origin": "API_DEFINITION", + "description": " Deletes a file (inside a Workspace).", + "canonical": true, + "file": "dataform.remove_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.RemoveFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "RemoveFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.RemoveFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_MoveFile_async", + "title": "Dataform moveFile Sample", + "origin": "API_DEFINITION", + "description": " Moves a file (inside a Workspace) to a new location.", + "canonical": true, + "file": "dataform.move_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MoveFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.MoveFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "new_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.MoveFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "MoveFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.MoveFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_WriteFile_async", + "title": "Dataform writeFile Sample", + "origin": "API_DEFINITION", + "description": " Writes to a file (inside a Workspace).", + "canonical": true, + "file": "dataform.write_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "WriteFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.WriteFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "contents", + "type": "TYPE_BYTES" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.WriteFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "WriteFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.WriteFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_ListCompilationResults_async", + "title": "Dataform listCompilationResults Sample", + "origin": "API_DEFINITION", + "description": " Lists CompilationResults in a given Repository.", + "canonical": true, + "file": "dataform.list_compilation_results.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCompilationResults", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListCompilationResults", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.ListCompilationResultsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "ListCompilationResults", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListCompilationResults", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_GetCompilationResult_async", + "title": "Dataform getCompilationResult Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single CompilationResult.", + "canonical": true, + "file": "dataform.get_compilation_result.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCompilationResult", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetCompilationResult", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.CompilationResult", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "GetCompilationResult", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetCompilationResult", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_CreateCompilationResult_async", + "title": "Dataform createCompilationResult Sample", + "origin": "API_DEFINITION", + "description": " Creates a new CompilationResult in a given project and location.", + "canonical": true, + "file": "dataform.create_compilation_result.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCompilationResult", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateCompilationResult", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "compilation_result", + "type": ".google.cloud.dataform.v1alpha2.CompilationResult" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.CompilationResult", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "CreateCompilationResult", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateCompilationResult", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_QueryCompilationResultActions_async", + "title": "Dataform queryCompilationResultActions Sample", + "origin": "API_DEFINITION", + "description": " Returns CompilationResultActions in a given CompilationResult.", + "canonical": true, + "file": "dataform.query_compilation_result_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryCompilationResultActions", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.QueryCompilationResultActions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "QueryCompilationResultActions", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.QueryCompilationResultActions", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_ListWorkflowInvocations_async", + "title": "Dataform listWorkflowInvocations Sample", + "origin": "API_DEFINITION", + "description": " Lists WorkflowInvocations in a given Repository.", + "canonical": true, + "file": "dataform.list_workflow_invocations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkflowInvocations", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListWorkflowInvocations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "ListWorkflowInvocations", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListWorkflowInvocations", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_GetWorkflowInvocation_async", + "title": "Dataform getWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single WorkflowInvocation.", + "canonical": true, + "file": "dataform.get_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.WorkflowInvocation", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "GetWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_CreateWorkflowInvocation_async", + "title": "Dataform createWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Creates a new WorkflowInvocation in a given Repository.", + "canonical": true, + "file": "dataform.create_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "workflow_invocation", + "type": ".google.cloud.dataform.v1alpha2.WorkflowInvocation" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.WorkflowInvocation", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "CreateWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_DeleteWorkflowInvocation_async", + "title": "Dataform deleteWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single WorkflowInvocation.", + "canonical": true, + "file": "dataform.delete_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.DeleteWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "DeleteWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.DeleteWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_CancelWorkflowInvocation_async", + "title": "Dataform cancelWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Requests cancellation of a running WorkflowInvocation.", + "canonical": true, + "file": "dataform.cancel_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CancelWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "CancelWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CancelWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_QueryWorkflowInvocationActions_async", + "title": "Dataform queryWorkflowInvocationActions Sample", + "origin": "API_DEFINITION", + "description": " Returns WorkflowInvocationActions in a given WorkflowInvocation.", + "canonical": true, + "file": "dataform.query_workflow_invocation_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryWorkflowInvocationActions", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.QueryWorkflowInvocationActions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "QueryWorkflowInvocationActions", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.QueryWorkflowInvocationActions", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js new file mode 100644 index 00000000000..929972fe4d4 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCancelWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.cancelWorkflowInvocation(request); + console.log(response); + } + + callCancelWorkflowInvocation(); + // [END dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js new file mode 100644 index 00000000000..2f4f876ccc5 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js @@ -0,0 +1,75 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, author) { + // [START dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Required. The commit's author. + */ + // const author = {} + /** + * Optional. The commit's message. + */ + // const commitMessage = 'abc123' + /** + * Optional. Full file paths to commit including filename, rooted at workspace root. If + * left empty, all files will be committed. + */ + // const paths = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCommitWorkspaceChanges() { + // Construct request + const request = { + name, + author, + }; + + // Run request + const response = await dataformClient.commitWorkspaceChanges(request); + console.log(response); + } + + callCommitWorkspaceChanges(); + // [END dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js new file mode 100644 index 00000000000..feb504bef02 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, compilationResult) { + // [START dataform_v1beta1_generated_Dataform_CreateCompilationResult_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the compilation result. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The compilation result to create. + */ + // const compilationResult = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateCompilationResult() { + // Construct request + const request = { + parent, + compilationResult, + }; + + // Run request + const response = await dataformClient.createCompilationResult(request); + console.log(response); + } + + callCreateCompilationResult(); + // [END dataform_v1beta1_generated_Dataform_CreateCompilationResult_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js new file mode 100644 index 00000000000..4599641b7f0 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js @@ -0,0 +1,73 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, repository, repositoryId) { + // [START dataform_v1beta1_generated_Dataform_CreateRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The location in which to create the repository. Must be in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. The repository to create. + */ + // const repository = {} + /** + * Required. The ID to use for the repository, which will become the final component of + * the repository's resource name. + */ + // const repositoryId = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateRepository() { + // Construct request + const request = { + parent, + repository, + repositoryId, + }; + + // Run request + const response = await dataformClient.createRepository(request); + console.log(response); + } + + callCreateRepository(); + // [END dataform_v1beta1_generated_Dataform_CreateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js new file mode 100644 index 00000000000..14374f0a6f1 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, workflowInvocation) { + // [START dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the workflow invocation. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The workflow invocation resource to create. + */ + // const workflowInvocation = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateWorkflowInvocation() { + // Construct request + const request = { + parent, + workflowInvocation, + }; + + // Run request + const response = await dataformClient.createWorkflowInvocation(request); + console.log(response); + } + + callCreateWorkflowInvocation(); + // [END dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js new file mode 100644 index 00000000000..f10789a32ad --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js @@ -0,0 +1,73 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, workspace, workspaceId) { + // [START dataform_v1beta1_generated_Dataform_CreateWorkspace_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the workspace. Must be in the format + * `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The workspace to create. + */ + // const workspace = {} + /** + * Required. The ID to use for the workspace, which will become the final component of + * the workspace's resource name. + */ + // const workspaceId = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateWorkspace() { + // Construct request + const request = { + parent, + workspace, + workspaceId, + }; + + // Run request + const response = await dataformClient.createWorkspace(request); + console.log(response); + } + + callCreateWorkspace(); + // [END dataform_v1beta1_generated_Dataform_CreateWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js new file mode 100644 index 00000000000..d4b29d8d5c0 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_DeleteRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + /** + * If set to true, any child resources of this repository will also be + * deleted. (Otherwise, the request will only succeed if the repository has no + * child resources.) + */ + // const force = true + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteRepository(request); + console.log(response); + } + + callDeleteRepository(); + // [END dataform_v1beta1_generated_Dataform_DeleteRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js new file mode 100644 index 00000000000..112f9b17ac5 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteWorkflowInvocation(request); + console.log(response); + } + + callDeleteWorkflowInvocation(); + // [END dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js new file mode 100644 index 00000000000..b5ee288086d --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_DeleteWorkspace_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteWorkspace(request); + console.log(response); + } + + callDeleteWorkspace(); + // [END dataform_v1beta1_generated_Dataform_DeleteWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js new file mode 100644 index 00000000000..392a1bd31ec --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_FetchFileDiff_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchFileDiff() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.fetchFileDiff(request); + console.log(response); + } + + callFetchFileDiff(); + // [END dataform_v1beta1_generated_Dataform_FetchFileDiff_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js new file mode 100644 index 00000000000..76432adb9d3 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchFileGitStatuses() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchFileGitStatuses(request); + console.log(response); + } + + callFetchFileGitStatuses(); + // [END dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js new file mode 100644 index 00000000000..afa36f5e907 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote against which this workspace + * should be compared. If left unset, the repository's default branch name + * will be used. + */ + // const remoteBranch = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchGitAheadBehind() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchGitAheadBehind(request); + console.log(response); + } + + callFetchGitAheadBehind(); + // [END dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js new file mode 100644 index 00000000000..2b71f6ca0dc --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchRemoteBranches() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchRemoteBranches(request); + console.log(response); + } + + callFetchRemoteBranches(); + // [END dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js new file mode 100644 index 00000000000..b745a0d9a86 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_GetCompilationResult_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The compilation result's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetCompilationResult() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getCompilationResult(request); + console.log(response); + } + + callGetCompilationResult(); + // [END dataform_v1beta1_generated_Dataform_GetCompilationResult_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js new file mode 100644 index 00000000000..5f9e22e4004 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_GetRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getRepository(request); + console.log(response); + } + + callGetRepository(); + // [END dataform_v1beta1_generated_Dataform_GetRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js new file mode 100644 index 00000000000..416bd7db1bd --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getWorkflowInvocation(request); + console.log(response); + } + + callGetWorkflowInvocation(); + // [END dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js new file mode 100644 index 00000000000..02fdd5d9454 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_GetWorkspace_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getWorkspace(request); + console.log(response); + } + + callGetWorkspace(); + // [END dataform_v1beta1_generated_Dataform_GetWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js new file mode 100644 index 00000000000..a1748730158 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace) { + // [START dataform_v1beta1_generated_Dataform_InstallNpmPackages_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callInstallNpmPackages() { + // Construct request + const request = { + workspace, + }; + + // Run request + const response = await dataformClient.installNpmPackages(request); + console.log(response); + } + + callInstallNpmPackages(); + // [END dataform_v1beta1_generated_Dataform_InstallNpmPackages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js new file mode 100644 index 00000000000..b79a68ddf5e --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js @@ -0,0 +1,77 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1beta1_generated_Dataform_ListCompilationResults_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListCompilationResults() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listCompilationResultsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCompilationResults(); + // [END dataform_v1beta1_generated_Dataform_ListCompilationResults_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js new file mode 100644 index 00000000000..a1c97348910 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js @@ -0,0 +1,87 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1beta1_generated_Dataform_ListRepositories_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + */ + // const orderBy = 'abc123' + /** + * Optional. Filter for the returned list. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListRepositories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listRepositoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRepositories(); + // [END dataform_v1beta1_generated_Dataform_ListRepositories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js new file mode 100644 index 00000000000..c59f981acfc --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js @@ -0,0 +1,77 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListWorkflowInvocations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listWorkflowInvocationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkflowInvocations(); + // [END dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js new file mode 100644 index 00000000000..c1f6373caf9 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js @@ -0,0 +1,87 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1beta1_generated_Dataform_ListWorkspaces_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + */ + // const orderBy = 'abc123' + /** + * Optional. Filter for the returned list. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListWorkspaces() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listWorkspacesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkspaces(); + // [END dataform_v1beta1_generated_Dataform_ListWorkspaces_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js new file mode 100644 index 00000000000..796a2f4c337 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_MakeDirectory_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMakeDirectory() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.makeDirectory(request); + console.log(response); + } + + callMakeDirectory(); + // [END dataform_v1beta1_generated_Dataform_MakeDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js new file mode 100644 index 00000000000..32b4a6c46f5 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js @@ -0,0 +1,73 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, newPath) { + // [START dataform_v1beta1_generated_Dataform_MoveDirectory_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + /** + * Required. The new path for the directory including directory name, rooted at + * workspace root. + */ + // const newPath = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMoveDirectory() { + // Construct request + const request = { + workspace, + path, + newPath, + }; + + // Run request + const response = await dataformClient.moveDirectory(request); + console.log(response); + } + + callMoveDirectory(); + // [END dataform_v1beta1_generated_Dataform_MoveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js new file mode 100644 index 00000000000..eff15304ee6 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, newPath) { + // [START dataform_v1beta1_generated_Dataform_MoveFile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + /** + * Required. The file's new path including filename, relative to the workspace root. + */ + // const newPath = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMoveFile() { + // Construct request + const request = { + workspace, + path, + newPath, + }; + + // Run request + const response = await dataformClient.moveFile(request); + console.log(response); + } + + callMoveFile(); + // [END dataform_v1beta1_generated_Dataform_MoveFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js new file mode 100644 index 00000000000..e5d141fc50b --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js @@ -0,0 +1,72 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, author) { + // [START dataform_v1beta1_generated_Dataform_PullGitCommits_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote from which to pull commits. + * If left unset, the repository's default branch name will be used. + */ + // const remoteBranch = 'abc123' + /** + * Required. The author of any merge commit which may be created as a result of merging + * fetched Git commits into this workspace. + */ + // const author = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callPullGitCommits() { + // Construct request + const request = { + name, + author, + }; + + // Run request + const response = await dataformClient.pullGitCommits(request); + console.log(response); + } + + callPullGitCommits(); + // [END dataform_v1beta1_generated_Dataform_PullGitCommits_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js new file mode 100644 index 00000000000..985f1257ae3 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_PushGitCommits_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote to which commits should be pushed. + * If left unset, the repository's default branch name will be used. + */ + // const remoteBranch = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callPushGitCommits() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.pushGitCommits(request); + console.log(response); + } + + callPushGitCommits(); + // [END dataform_v1beta1_generated_Dataform_PushGitCommits_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js new file mode 100644 index 00000000000..dd5a82fefb3 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js @@ -0,0 +1,82 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The compilation result's name. + */ + // const name = 'abc123' + /** + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryCompilationResultActions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await dataformClient.queryCompilationResultActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryCompilationResultActions(); + // [END dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js new file mode 100644 index 00000000000..f11ebc2f4c7 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js @@ -0,0 +1,82 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace) { + // [START dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + */ + // const path = 'abc123' + /** + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryDirectoryContents() { + // Construct request + const request = { + workspace, + }; + + // Run request + const iterable = await dataformClient.queryDirectoryContentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryDirectoryContents(); + // [END dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js new file mode 100644 index 00000000000..4e61bebc07b --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js @@ -0,0 +1,77 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation's name. + */ + // const name = 'abc123' + /** + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryWorkflowInvocationActions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await dataformClient.queryWorkflowInvocationActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryWorkflowInvocationActions(); + // [END dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js new file mode 100644 index 00000000000..bcd470f0811 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_ReadFile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callReadFile() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.readFile(request); + console.log(response); + } + + callReadFile(); + // [END dataform_v1beta1_generated_Dataform_ReadFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js new file mode 100644 index 00000000000..975e2258de0 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_RemoveDirectory_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callRemoveDirectory() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.removeDirectory(request); + console.log(response); + } + + callRemoveDirectory(); + // [END dataform_v1beta1_generated_Dataform_RemoveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js new file mode 100644 index 00000000000..dd9031c5a5f --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_RemoveFile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callRemoveFile() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.removeFile(request); + console.log(response); + } + + callRemoveFile(); + // [END dataform_v1beta1_generated_Dataform_RemoveFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js new file mode 100644 index 00000000000..b5c255e3919 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js @@ -0,0 +1,70 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. Full file paths to reset back to their committed state including filename, + * rooted at workspace root. If left empty, all files will be reset. + */ + // const paths = 'abc123' + /** + * Optional. If set to true, untracked files will be deleted. + */ + // const clean = true + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callResetWorkspaceChanges() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.resetWorkspaceChanges(request); + console.log(response); + } + + callResetWorkspaceChanges(); + // [END dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js new file mode 100644 index 00000000000..16e383a3b7d --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(repository) { + // [START dataform_v1beta1_generated_Dataform_UpdateRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. Specifies the fields to be updated in the repository. If left unset, + * all fields will be updated. + */ + // const updateMask = {} + /** + * Required. The repository to update. + */ + // const repository = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callUpdateRepository() { + // Construct request + const request = { + repository, + }; + + // Run request + const response = await dataformClient.updateRepository(request); + console.log(response); + } + + callUpdateRepository(); + // [END dataform_v1beta1_generated_Dataform_UpdateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js new file mode 100644 index 00000000000..62ed1b6e99d --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, contents) { + // [START dataform_v1beta1_generated_Dataform_WriteFile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file. + */ + // const path = 'abc123' + /** + * Required. The file's contents. + */ + // const contents = 'Buffer.from('string')' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callWriteFile() { + // Construct request + const request = { + workspace, + path, + contents, + }; + + // Run request + const response = await dataformClient.writeFile(request); + console.log(response); + } + + callWriteFile(); + // [END dataform_v1beta1_generated_Dataform_WriteFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json new file mode 100644 index 00000000000..db73c05ad4b --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json @@ -0,0 +1,1647 @@ +{ + "clientLibrary": { + "name": "nodejs-dataform", + "version": "0.4.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.dataform.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "dataform_v1beta1_generated_Dataform_ListRepositories_async", + "title": "Dataform listRepositories Sample", + "origin": "API_DEFINITION", + "description": " Lists Repositories in a given project and location.", + "canonical": true, + "file": "dataform.list_repositories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRepositories", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListRepositories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ListRepositoriesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ListRepositories", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListRepositories", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_GetRepository_async", + "title": "Dataform getRepository Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single Repository.", + "canonical": true, + "file": "dataform.get_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "GetRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CreateRepository_async", + "title": "Dataform createRepository Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Repository in a given project and location.", + "canonical": true, + "file": "dataform.create_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateRepository", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "repository", + "type": ".google.cloud.dataform.v1beta1.Repository" + }, + { + "name": "repository_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CreateRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_UpdateRepository_async", + "title": "Dataform updateRepository Sample", + "origin": "API_DEFINITION", + "description": " Updates a single Repository.", + "canonical": true, + "file": "dataform.update_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.UpdateRepository", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "repository", + "type": ".google.cloud.dataform.v1beta1.Repository" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "UpdateRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.UpdateRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_DeleteRepository_async", + "title": "Dataform deleteRepository Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Repository.", + "canonical": true, + "file": "dataform.delete_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "DeleteRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async", + "title": "Dataform fetchRemoteBranches Sample", + "origin": "API_DEFINITION", + "description": " Fetches a Repository's remote branches.", + "canonical": true, + "file": "dataform.fetch_remote_branches.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchRemoteBranches", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchRemoteBranches", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "FetchRemoteBranches", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchRemoteBranches", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ListWorkspaces_async", + "title": "Dataform listWorkspaces Sample", + "origin": "API_DEFINITION", + "description": " Lists Workspaces in a given Repository.", + "canonical": true, + "file": "dataform.list_workspaces.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkspaces", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListWorkspaces", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ListWorkspacesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ListWorkspaces", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListWorkspaces", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_GetWorkspace_async", + "title": "Dataform getWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single Workspace.", + "canonical": true, + "file": "dataform.get_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Workspace", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "GetWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CreateWorkspace_async", + "title": "Dataform createWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Workspace in a given Repository.", + "canonical": true, + "file": "dataform.create_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateWorkspace", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "workspace", + "type": ".google.cloud.dataform.v1beta1.Workspace" + }, + { + "name": "workspace_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Workspace", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CreateWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_DeleteWorkspace_async", + "title": "Dataform deleteWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Workspace.", + "canonical": true, + "file": "dataform.delete_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "DeleteWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_InstallNpmPackages_async", + "title": "Dataform installNpmPackages Sample", + "origin": "API_DEFINITION", + "description": " Installs dependency NPM packages (inside a Workspace).", + "canonical": true, + "file": "dataform.install_npm_packages.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "InstallNpmPackages", + "fullName": "google.cloud.dataform.v1beta1.Dataform.InstallNpmPackages", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.InstallNpmPackagesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "InstallNpmPackages", + "fullName": "google.cloud.dataform.v1beta1.Dataform.InstallNpmPackages", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_PullGitCommits_async", + "title": "Dataform pullGitCommits Sample", + "origin": "API_DEFINITION", + "description": " Pulls Git commits from the Repository's remote into a Workspace.", + "canonical": true, + "file": "dataform.pull_git_commits.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PullGitCommits", + "fullName": "google.cloud.dataform.v1beta1.Dataform.PullGitCommits", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + }, + { + "name": "author", + "type": ".google.cloud.dataform.v1beta1.CommitAuthor" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "PullGitCommits", + "fullName": "google.cloud.dataform.v1beta1.Dataform.PullGitCommits", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_PushGitCommits_async", + "title": "Dataform pushGitCommits Sample", + "origin": "API_DEFINITION", + "description": " Pushes Git commits from a Workspace to the Repository's remote.", + "canonical": true, + "file": "dataform.push_git_commits.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PushGitCommits", + "fullName": "google.cloud.dataform.v1beta1.Dataform.PushGitCommits", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "PushGitCommits", + "fullName": "google.cloud.dataform.v1beta1.Dataform.PushGitCommits", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async", + "title": "Dataform fetchFileGitStatuses Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git statuses for the files in a Workspace.", + "canonical": true, + "file": "dataform.fetch_file_git_statuses.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchFileGitStatuses", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchFileGitStatuses", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "FetchFileGitStatuses", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchFileGitStatuses", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async", + "title": "Dataform fetchGitAheadBehind Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git ahead/behind against a remote branch.", + "canonical": true, + "file": "dataform.fetch_git_ahead_behind.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchGitAheadBehind", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchGitAheadBehind", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "FetchGitAheadBehind", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchGitAheadBehind", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async", + "title": "Dataform commitWorkspaceChanges Sample", + "origin": "API_DEFINITION", + "description": " Applies a Git commit for uncommitted files in a Workspace.", + "canonical": true, + "file": "dataform.commit_workspace_changes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CommitWorkspaceChanges", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CommitWorkspaceChanges", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "author", + "type": ".google.cloud.dataform.v1beta1.CommitAuthor" + }, + { + "name": "commit_message", + "type": "TYPE_STRING" + }, + { + "name": "paths", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CommitWorkspaceChanges", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CommitWorkspaceChanges", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async", + "title": "Dataform resetWorkspaceChanges Sample", + "origin": "API_DEFINITION", + "description": " Performs a Git reset for uncommitted files in a Workspace.", + "canonical": true, + "file": "dataform.reset_workspace_changes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ResetWorkspaceChanges", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ResetWorkspaceChanges", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "paths", + "type": "TYPE_STRING[]" + }, + { + "name": "clean", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ResetWorkspaceChanges", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ResetWorkspaceChanges", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_FetchFileDiff_async", + "title": "Dataform fetchFileDiff Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git diff for an uncommitted file in a Workspace.", + "canonical": true, + "file": "dataform.fetch_file_diff.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchFileDiff", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchFileDiff", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.FetchFileDiffResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "FetchFileDiff", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchFileDiff", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async", + "title": "Dataform queryDirectoryContents Sample", + "origin": "API_DEFINITION", + "description": " Returns the contents of a given Workspace directory.", + "canonical": true, + "file": "dataform.query_directory_contents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryDirectoryContents", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryDirectoryContents", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "QueryDirectoryContents", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryDirectoryContents", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_MakeDirectory_async", + "title": "Dataform makeDirectory Sample", + "origin": "API_DEFINITION", + "description": " Creates a directory inside a Workspace.", + "canonical": true, + "file": "dataform.make_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MakeDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MakeDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.MakeDirectoryResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "MakeDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MakeDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_RemoveDirectory_async", + "title": "Dataform removeDirectory Sample", + "origin": "API_DEFINITION", + "description": " Deletes a directory (inside a Workspace) and all of its contents.", + "canonical": true, + "file": "dataform.remove_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.RemoveDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "RemoveDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.RemoveDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_MoveDirectory_async", + "title": "Dataform moveDirectory Sample", + "origin": "API_DEFINITION", + "description": " Moves a directory (inside a Workspace), and all of its contents, to a new location.", + "canonical": true, + "file": "dataform.move_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MoveDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MoveDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "new_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.MoveDirectoryResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "MoveDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MoveDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ReadFile_async", + "title": "Dataform readFile Sample", + "origin": "API_DEFINITION", + "description": " Returns the contents of a file (inside a Workspace).", + "canonical": true, + "file": "dataform.read_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ReadFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ReadFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ReadFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ReadFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_RemoveFile_async", + "title": "Dataform removeFile Sample", + "origin": "API_DEFINITION", + "description": " Deletes a file (inside a Workspace).", + "canonical": true, + "file": "dataform.remove_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.RemoveFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "RemoveFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.RemoveFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_MoveFile_async", + "title": "Dataform moveFile Sample", + "origin": "API_DEFINITION", + "description": " Moves a file (inside a Workspace) to a new location.", + "canonical": true, + "file": "dataform.move_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MoveFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MoveFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "new_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.MoveFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "MoveFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MoveFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_WriteFile_async", + "title": "Dataform writeFile Sample", + "origin": "API_DEFINITION", + "description": " Writes to a file (inside a Workspace).", + "canonical": true, + "file": "dataform.write_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "WriteFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.WriteFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "contents", + "type": "TYPE_BYTES" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.WriteFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "WriteFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.WriteFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ListCompilationResults_async", + "title": "Dataform listCompilationResults Sample", + "origin": "API_DEFINITION", + "description": " Lists CompilationResults in a given Repository.", + "canonical": true, + "file": "dataform.list_compilation_results.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCompilationResults", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListCompilationResults", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ListCompilationResultsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ListCompilationResults", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListCompilationResults", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_GetCompilationResult_async", + "title": "Dataform getCompilationResult Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single CompilationResult.", + "canonical": true, + "file": "dataform.get_compilation_result.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCompilationResult", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetCompilationResult", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.CompilationResult", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "GetCompilationResult", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetCompilationResult", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CreateCompilationResult_async", + "title": "Dataform createCompilationResult Sample", + "origin": "API_DEFINITION", + "description": " Creates a new CompilationResult in a given project and location.", + "canonical": true, + "file": "dataform.create_compilation_result.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCompilationResult", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateCompilationResult", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "compilation_result", + "type": ".google.cloud.dataform.v1beta1.CompilationResult" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.CompilationResult", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CreateCompilationResult", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateCompilationResult", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async", + "title": "Dataform queryCompilationResultActions Sample", + "origin": "API_DEFINITION", + "description": " Returns CompilationResultActions in a given CompilationResult.", + "canonical": true, + "file": "dataform.query_compilation_result_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryCompilationResultActions", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryCompilationResultActions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "QueryCompilationResultActions", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryCompilationResultActions", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async", + "title": "Dataform listWorkflowInvocations Sample", + "origin": "API_DEFINITION", + "description": " Lists WorkflowInvocations in a given Repository.", + "canonical": true, + "file": "dataform.list_workflow_invocations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkflowInvocations", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListWorkflowInvocations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ListWorkflowInvocations", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListWorkflowInvocations", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async", + "title": "Dataform getWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single WorkflowInvocation.", + "canonical": true, + "file": "dataform.get_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.WorkflowInvocation", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "GetWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async", + "title": "Dataform createWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Creates a new WorkflowInvocation in a given Repository.", + "canonical": true, + "file": "dataform.create_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "workflow_invocation", + "type": ".google.cloud.dataform.v1beta1.WorkflowInvocation" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.WorkflowInvocation", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CreateWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async", + "title": "Dataform deleteWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single WorkflowInvocation.", + "canonical": true, + "file": "dataform.delete_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "DeleteWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async", + "title": "Dataform cancelWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Requests cancellation of a running WorkflowInvocation.", + "canonical": true, + "file": "dataform.cancel_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CancelWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CancelWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CancelWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async", + "title": "Dataform queryWorkflowInvocationActions Sample", + "origin": "API_DEFINITION", + "description": " Returns WorkflowInvocationActions in a given WorkflowInvocation.", + "canonical": true, + "file": "dataform.query_workflow_invocation_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryWorkflowInvocationActions", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryWorkflowInvocationActions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "QueryWorkflowInvocationActions", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryWorkflowInvocationActions", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-dataform/samples/package.json b/packages/google-cloud-dataform/samples/package.json new file mode 100644 index 00000000000..be75b9aaa75 --- /dev/null +++ b/packages/google-cloud-dataform/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-dataform", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=10" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/dataform": "^0.4.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^10.0.0" + } +} diff --git a/packages/google-cloud-dataform/samples/quickstart.js b/packages/google-cloud-dataform/samples/quickstart.js new file mode 100644 index 00000000000..ea157a32744 --- /dev/null +++ b/packages/google-cloud-dataform/samples/quickstart.js @@ -0,0 +1,82 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(parent) { + // [START dataform_v1alpha2_generated_Dataform_ListRepositories_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + */ + // const orderBy = 'abc123' + /** + * Optional. Filter for the returned list. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListRepositories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listRepositoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRepositories(); + // [END dataform_v1alpha2_generated_Dataform_ListRepositories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/test/quickstart.js b/packages/google-cloud-dataform/samples/test/quickstart.js new file mode 100644 index 00000000000..4b0350ada64 --- /dev/null +++ b/packages/google-cloud-dataform/samples/test/quickstart.js @@ -0,0 +1,49 @@ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +const path = require('path'); +const cp = require('child_process'); +const {before, describe, it} = require('mocha'); +// eslint-disable-next-line node/no-missing-require +const {DataformClient} = require('@google-cloud/dataform'); +// eslint-disable-next-line no-unused-vars, node/no-missing-require +const {assert} = require('chai'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const client = new DataformClient(); + +describe('Quickstart', () => { + 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 projects/${projectId}/locations/us-central1`, + {cwd} + ); + assert.deepStrictEqual(stdout, ''); + }); +}); diff --git a/packages/google-cloud-dataform/src/index.ts b/packages/google-cloud-dataform/src/index.ts new file mode 100644 index 00000000000..2b1e5eecac7 --- /dev/null +++ b/packages/google-cloud-dataform/src/index.ts @@ -0,0 +1,28 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1alpha2 from './v1alpha2'; +import * as v1beta1 from './v1beta1'; + +const DataformClient = v1beta1.DataformClient; +type DataformClient = v1beta1.DataformClient; + +export {v1alpha2, v1beta1, DataformClient}; +export default {v1alpha2, v1beta1, DataformClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts new file mode 100644 index 00000000000..4616fedc194 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts @@ -0,0 +1,5335 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1alpha2/dataform_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './dataform_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Dataform is a service to develop, create, document, test, and update curated + * tables in BigQuery. + * @class + * @memberof v1alpha2 + */ +export class DataformClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + dataformStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataformClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataformClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataformClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + compilationResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + repositoryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}' + ), + workflowInvocationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}' + ), + workspacePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listRepositories: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'repositories' + ), + listWorkspaces: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workspaces' + ), + queryDirectoryContents: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'directoryEntries' + ), + listCompilationResults: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'compilationResults' + ), + queryCompilationResultActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'compilationResultActions' + ), + listWorkflowInvocations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workflowInvocations' + ), + queryWorkflowInvocationActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workflowInvocationActions' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataform.v1alpha2.Dataform', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataformStub) { + return this.dataformStub; + } + + // Put together the "service stub" for + // google.cloud.dataform.v1alpha2.Dataform. + this.dataformStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dataform.v1alpha2.Dataform' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataform.v1alpha2.Dataform, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const dataformStubMethods = [ + 'listRepositories', + 'getRepository', + 'createRepository', + 'updateRepository', + 'deleteRepository', + 'fetchRemoteBranches', + 'listWorkspaces', + 'getWorkspace', + 'createWorkspace', + 'deleteWorkspace', + 'installNpmPackages', + 'pullGitCommits', + 'pushGitCommits', + 'fetchFileGitStatuses', + 'fetchGitAheadBehind', + 'commitWorkspaceChanges', + 'resetWorkspaceChanges', + 'fetchFileDiff', + 'queryDirectoryContents', + 'makeDirectory', + 'removeDirectory', + 'moveDirectory', + 'readFile', + 'removeFile', + 'moveFile', + 'writeFile', + 'listCompilationResults', + 'getCompilationResult', + 'createCompilationResult', + 'queryCompilationResultActions', + 'listWorkflowInvocations', + 'getWorkflowInvocation', + 'createWorkflowInvocation', + 'deleteWorkflowInvocation', + 'cancelWorkflowInvocation', + 'queryWorkflowInvocationActions', + ]; + for (const methodName of dataformStubMethods) { + const callPromise = this.dataformStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataformStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dataform.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dataform.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Fetches a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.Repository | Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.get_repository.js + * region_tag:dataform_v1alpha2_generated_Dataform_GetRepository_async + */ + getRepository( + request?: protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository, + protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest | undefined, + {} | undefined + ] + >; + getRepository( + request: protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getRepository( + request: protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getRepository( + request?: protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository, + protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getRepository(request, options, callback); + } + /** + * Creates a new Repository in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to create the repository. Must be in the format + * `projects/* /locations/*`. + * @param {google.cloud.dataform.v1alpha2.Repository} request.repository + * Required. The repository to create. + * @param {string} request.repositoryId + * Required. The ID to use for the repository, which will become the final component of + * the repository's resource name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.Repository | Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.create_repository.js + * region_tag:dataform_v1alpha2_generated_Dataform_CreateRepository_async + */ + createRepository( + request?: protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository, + ( + | protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest + | undefined + ), + {} | undefined + ] + >; + createRepository( + request: protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createRepository( + request: protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createRepository( + request?: protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository, + ( + | protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createRepository(request, options, callback); + } + /** + * Updates a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Specifies the fields to be updated in the repository. If left unset, + * all fields will be updated. + * @param {google.cloud.dataform.v1alpha2.Repository} request.repository + * Required. The repository to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.Repository | Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.update_repository.js + * region_tag:dataform_v1alpha2_generated_Dataform_UpdateRepository_async + */ + updateRepository( + request?: protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository, + ( + | protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest + | undefined + ), + {} | undefined + ] + >; + updateRepository( + request: protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateRepository( + request: protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateRepository( + request?: protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository, + ( + | protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'repository.name': request.repository!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateRepository(request, options, callback); + } + /** + * Deletes a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @param {boolean} request.force + * If set to true, any child resources of this repository will also be + * deleted. (Otherwise, the request will only succeed if the repository has no + * child resources.) + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.delete_repository.js + * region_tag:dataform_v1alpha2_generated_Dataform_DeleteRepository_async + */ + deleteRepository( + request?: protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest + | undefined + ), + {} | undefined + ] + >; + deleteRepository( + request: protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request: protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request?: protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteRepository(request, options, callback); + } + /** + * Fetches a Repository's remote branches. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse | FetchRemoteBranchesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.fetch_remote_branches.js + * region_tag:dataform_v1alpha2_generated_Dataform_FetchRemoteBranches_async + */ + fetchRemoteBranches( + request?: protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest + | undefined + ), + {} | undefined + ] + >; + fetchRemoteBranches( + request: protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchRemoteBranches( + request: protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchRemoteBranches( + request?: protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchRemoteBranches(request, options, callback); + } + /** + * Fetches a single Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.Workspace | Workspace}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.get_workspace.js + * region_tag:dataform_v1alpha2_generated_Dataform_GetWorkspace_async + */ + getWorkspace( + request?: protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkspace, + protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest | undefined, + {} | undefined + ] + >; + getWorkspace( + request: protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkspace( + request: protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkspace( + request?: protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkspace, + protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getWorkspace(request, options, callback); + } + /** + * Creates a new Workspace in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the workspace. Must be in the format + * `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1alpha2.Workspace} request.workspace + * Required. The workspace to create. + * @param {string} request.workspaceId + * Required. The ID to use for the workspace, which will become the final component of + * the workspace's resource name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.Workspace | Workspace}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.create_workspace.js + * region_tag:dataform_v1alpha2_generated_Dataform_CreateWorkspace_async + */ + createWorkspace( + request?: protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkspace, + protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest | undefined, + {} | undefined + ] + >; + createWorkspace( + request: protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkspace( + request: protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkspace( + request?: protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkspace, + protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createWorkspace(request, options, callback); + } + /** + * Deletes a single Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.delete_workspace.js + * region_tag:dataform_v1alpha2_generated_Dataform_DeleteWorkspace_async + */ + deleteWorkspace( + request?: protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest | undefined, + {} | undefined + ] + >; + deleteWorkspace( + request: protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkspace( + request: protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkspace( + request?: protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteWorkspace(request, options, callback); + } + /** + * Installs dependency NPM packages (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse | InstallNpmPackagesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.install_npm_packages.js + * region_tag:dataform_v1alpha2_generated_Dataform_InstallNpmPackages_async + */ + installNpmPackages( + request?: protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest + | undefined + ), + {} | undefined + ] + >; + installNpmPackages( + request: protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + installNpmPackages( + request: protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + installNpmPackages( + request?: protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.installNpmPackages(request, options, callback); + } + /** + * Pulls Git commits from the Repository's remote into a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote from which to pull commits. + * If left unset, the repository's default branch name will be used. + * @param {google.cloud.dataform.v1alpha2.CommitAuthor} request.author + * Required. The author of any merge commit which may be created as a result of merging + * fetched Git commits into this workspace. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.pull_git_commits.js + * region_tag:dataform_v1alpha2_generated_Dataform_PullGitCommits_async + */ + pullGitCommits( + request?: protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest | undefined, + {} | undefined + ] + >; + pullGitCommits( + request: protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pullGitCommits( + request: protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pullGitCommits( + request?: protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.pullGitCommits(request, options, callback); + } + /** + * Pushes Git commits from a Workspace to the Repository's remote. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote to which commits should be pushed. + * If left unset, the repository's default branch name will be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.push_git_commits.js + * region_tag:dataform_v1alpha2_generated_Dataform_PushGitCommits_async + */ + pushGitCommits( + request?: protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest | undefined, + {} | undefined + ] + >; + pushGitCommits( + request: protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pushGitCommits( + request: protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pushGitCommits( + request?: protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.pushGitCommits(request, options, callback); + } + /** + * Fetches Git statuses for the files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse | FetchFileGitStatusesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js + * region_tag:dataform_v1alpha2_generated_Dataform_FetchFileGitStatuses_async + */ + fetchFileGitStatuses( + request?: protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest + | undefined + ), + {} | undefined + ] + >; + fetchFileGitStatuses( + request: protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileGitStatuses( + request: protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileGitStatuses( + request?: protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchFileGitStatuses(request, options, callback); + } + /** + * Fetches Git ahead/behind against a remote branch. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote against which this workspace + * should be compared. If left unset, the repository's default branch name + * will be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse | FetchGitAheadBehindResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js + * region_tag:dataform_v1alpha2_generated_Dataform_FetchGitAheadBehind_async + */ + fetchGitAheadBehind( + request?: protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest + | undefined + ), + {} | undefined + ] + >; + fetchGitAheadBehind( + request: protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchGitAheadBehind( + request: protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchGitAheadBehind( + request?: protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchGitAheadBehind(request, options, callback); + } + /** + * Applies a Git commit for uncommitted files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {google.cloud.dataform.v1alpha2.CommitAuthor} request.author + * Required. The commit's author. + * @param {string} [request.commitMessage] + * Optional. The commit's message. + * @param {string[]} [request.paths] + * Optional. Full file paths to commit including filename, rooted at workspace root. If + * left empty, all files will be committed. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.commit_workspace_changes.js + * region_tag:dataform_v1alpha2_generated_Dataform_CommitWorkspaceChanges_async + */ + commitWorkspaceChanges( + request?: protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + >; + commitWorkspaceChanges( + request: protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + commitWorkspaceChanges( + request: protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + commitWorkspaceChanges( + request?: protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.commitWorkspaceChanges( + request, + options, + callback + ); + } + /** + * Performs a Git reset for uncommitted files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string[]} [request.paths] + * Optional. Full file paths to reset back to their committed state including filename, + * rooted at workspace root. If left empty, all files will be reset. + * @param {boolean} [request.clean] + * Optional. If set to true, untracked files will be deleted. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.reset_workspace_changes.js + * region_tag:dataform_v1alpha2_generated_Dataform_ResetWorkspaceChanges_async + */ + resetWorkspaceChanges( + request?: protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + >; + resetWorkspaceChanges( + request: protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resetWorkspaceChanges( + request: protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resetWorkspaceChanges( + request?: protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.resetWorkspaceChanges(request, options, callback); + } + /** + * Fetches Git diff for an uncommitted file in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.FetchFileDiffResponse | FetchFileDiffResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.fetch_file_diff.js + * region_tag:dataform_v1alpha2_generated_Dataform_FetchFileDiff_async + */ + fetchFileDiff( + request?: protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest | undefined, + {} | undefined + ] + >; + fetchFileDiff( + request: protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileDiff( + request: protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileDiff( + request?: protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchFileDiff(request, options, callback); + } + /** + * Creates a directory inside a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.MakeDirectoryResponse | MakeDirectoryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.make_directory.js + * region_tag:dataform_v1alpha2_generated_Dataform_MakeDirectory_async + */ + makeDirectory( + request?: protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest | undefined, + {} | undefined + ] + >; + makeDirectory( + request: protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + makeDirectory( + request: protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + makeDirectory( + request?: protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.makeDirectory(request, options, callback); + } + /** + * Deletes a directory (inside a Workspace) and all of its contents. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.remove_directory.js + * region_tag:dataform_v1alpha2_generated_Dataform_RemoveDirectory_async + */ + removeDirectory( + request?: protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest | undefined, + {} | undefined + ] + >; + removeDirectory( + request: protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeDirectory( + request: protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeDirectory( + request?: protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.removeDirectory(request, options, callback); + } + /** + * Moves a directory (inside a Workspace), and all of its contents, to a new + * location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {string} request.newPath + * Required. The new path for the directory including directory name, rooted at + * workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.MoveDirectoryResponse | MoveDirectoryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.move_directory.js + * region_tag:dataform_v1alpha2_generated_Dataform_MoveDirectory_async + */ + moveDirectory( + request?: protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest | undefined, + {} | undefined + ] + >; + moveDirectory( + request: protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + moveDirectory( + request: protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + moveDirectory( + request?: protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.moveDirectory(request, options, callback); + } + /** + * Returns the contents of a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.ReadFileResponse | ReadFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.read_file.js + * region_tag:dataform_v1alpha2_generated_Dataform_ReadFile_async + */ + readFile( + request?: protos.google.cloud.dataform.v1alpha2.IReadFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IReadFileResponse, + protos.google.cloud.dataform.v1alpha2.IReadFileRequest | undefined, + {} | undefined + ] + >; + readFile( + request: protos.google.cloud.dataform.v1alpha2.IReadFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IReadFileResponse, + protos.google.cloud.dataform.v1alpha2.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): void; + readFile( + request: protos.google.cloud.dataform.v1alpha2.IReadFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IReadFileResponse, + protos.google.cloud.dataform.v1alpha2.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): void; + readFile( + request?: protos.google.cloud.dataform.v1alpha2.IReadFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IReadFileResponse, + | protos.google.cloud.dataform.v1alpha2.IReadFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IReadFileResponse, + protos.google.cloud.dataform.v1alpha2.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IReadFileResponse, + protos.google.cloud.dataform.v1alpha2.IReadFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.readFile(request, options, callback); + } + /** + * Deletes a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.remove_file.js + * region_tag:dataform_v1alpha2_generated_Dataform_RemoveFile_async + */ + removeFile( + request?: protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest | undefined, + {} | undefined + ] + >; + removeFile( + request: protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeFile( + request: protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeFile( + request?: protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.removeFile(request, options, callback); + } + /** + * Moves a file (inside a Workspace) to a new location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {string} request.newPath + * Required. The file's new path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.MoveFileResponse | MoveFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.move_file.js + * region_tag:dataform_v1alpha2_generated_Dataform_MoveFile_async + */ + moveFile( + request?: protos.google.cloud.dataform.v1alpha2.IMoveFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IMoveFileResponse, + protos.google.cloud.dataform.v1alpha2.IMoveFileRequest | undefined, + {} | undefined + ] + >; + moveFile( + request: protos.google.cloud.dataform.v1alpha2.IMoveFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IMoveFileResponse, + protos.google.cloud.dataform.v1alpha2.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): void; + moveFile( + request: protos.google.cloud.dataform.v1alpha2.IMoveFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IMoveFileResponse, + protos.google.cloud.dataform.v1alpha2.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): void; + moveFile( + request?: protos.google.cloud.dataform.v1alpha2.IMoveFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IMoveFileResponse, + | protos.google.cloud.dataform.v1alpha2.IMoveFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IMoveFileResponse, + protos.google.cloud.dataform.v1alpha2.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IMoveFileResponse, + protos.google.cloud.dataform.v1alpha2.IMoveFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.moveFile(request, options, callback); + } + /** + * Writes to a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file. + * @param {Buffer} request.contents + * Required. The file's contents. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.WriteFileResponse | WriteFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.write_file.js + * region_tag:dataform_v1alpha2_generated_Dataform_WriteFile_async + */ + writeFile( + request?: protos.google.cloud.dataform.v1alpha2.IWriteFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWriteFileResponse, + protos.google.cloud.dataform.v1alpha2.IWriteFileRequest | undefined, + {} | undefined + ] + >; + writeFile( + request: protos.google.cloud.dataform.v1alpha2.IWriteFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWriteFileResponse, + | protos.google.cloud.dataform.v1alpha2.IWriteFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + writeFile( + request: protos.google.cloud.dataform.v1alpha2.IWriteFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWriteFileResponse, + | protos.google.cloud.dataform.v1alpha2.IWriteFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + writeFile( + request?: protos.google.cloud.dataform.v1alpha2.IWriteFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IWriteFileResponse, + | protos.google.cloud.dataform.v1alpha2.IWriteFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IWriteFileResponse, + | protos.google.cloud.dataform.v1alpha2.IWriteFileRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWriteFileResponse, + protos.google.cloud.dataform.v1alpha2.IWriteFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.writeFile(request, options, callback); + } + /** + * Fetches a single CompilationResult. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.CompilationResult | CompilationResult}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.get_compilation_result.js + * region_tag:dataform_v1alpha2_generated_Dataform_GetCompilationResult_async + */ + getCompilationResult( + request?: protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + ( + | protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest + | undefined + ), + {} | undefined + ] + >; + getCompilationResult( + request: protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCompilationResult( + request: protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCompilationResult( + request?: protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + ( + | protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getCompilationResult(request, options, callback); + } + /** + * Creates a new CompilationResult in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the compilation result. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1alpha2.CompilationResult} request.compilationResult + * Required. The compilation result to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.CompilationResult | CompilationResult}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.create_compilation_result.js + * region_tag:dataform_v1alpha2_generated_Dataform_CreateCompilationResult_async + */ + createCompilationResult( + request?: protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + ( + | protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest + | undefined + ), + {} | undefined + ] + >; + createCompilationResult( + request: protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCompilationResult( + request: protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCompilationResult( + request?: protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + ( + | protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createCompilationResult( + request, + options, + callback + ); + } + /** + * Fetches a single WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.WorkflowInvocation | WorkflowInvocation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.get_workflow_invocation.js + * region_tag:dataform_v1alpha2_generated_Dataform_GetWorkflowInvocation_async + */ + getWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + getWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getWorkflowInvocation(request, options, callback); + } + /** + * Creates a new WorkflowInvocation in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation} request.workflowInvocation + * Required. The workflow invocation resource to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.WorkflowInvocation | WorkflowInvocation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.create_workflow_invocation.js + * region_tag:dataform_v1alpha2_generated_Dataform_CreateWorkflowInvocation_async + */ + createWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + createWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createWorkflowInvocation( + request, + options, + callback + ); + } + /** + * Deletes a single WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.delete_workflow_invocation.js + * region_tag:dataform_v1alpha2_generated_Dataform_DeleteWorkflowInvocation_async + */ + deleteWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + deleteWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteWorkflowInvocation( + request, + options, + callback + ); + } + /** + * Requests cancellation of a running WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js + * region_tag:dataform_v1alpha2_generated_Dataform_CancelWorkflowInvocation_async + */ + cancelWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + cancelWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.cancelWorkflowInvocation( + request, + options, + callback + ); + } + + /** + * Lists Repositories in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.Repository | Repository}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRepositories( + request?: protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository[], + protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest | null, + protos.google.cloud.dataform.v1alpha2.IListRepositoriesResponse + ] + >; + listRepositories( + request: protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1alpha2.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IRepository + > + ): void; + listRepositories( + request: protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1alpha2.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IRepository + > + ): void; + listRepositories( + request?: protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1alpha2.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IRepository + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1alpha2.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IRepository + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository[], + protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest | null, + protos.google.cloud.dataform.v1alpha2.IListRepositoriesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listRepositories(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.Repository | Repository} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRepositoriesStream( + request?: protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.createStream( + this.innerApiCalls.listRepositories as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listRepositories`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1alpha2.Repository | Repository}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.list_repositories.js + * region_tag:dataform_v1alpha2_generated_Dataform_ListRepositories_async + */ + listRepositoriesAsync( + request?: protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.asyncIterate( + this.innerApiCalls['listRepositories'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Workspaces in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.Workspace | Workspace}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listWorkspacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkspaces( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkspace[], + protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest | null, + protos.google.cloud.dataform.v1alpha2.IListWorkspacesResponse + ] + >; + listWorkspaces( + request: protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkspace + > + ): void; + listWorkspaces( + request: protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkspace + > + ): void; + listWorkspaces( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkspace + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkspace + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkspace[], + protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest | null, + protos.google.cloud.dataform.v1alpha2.IListWorkspacesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listWorkspaces(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.Workspace | Workspace} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listWorkspacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkspacesStream( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listWorkspaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkspaces.createStream( + this.innerApiCalls.listWorkspaces as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listWorkspaces`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1alpha2.Workspace | Workspace}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.list_workspaces.js + * region_tag:dataform_v1alpha2_generated_Dataform_ListWorkspaces_async + */ + listWorkspacesAsync( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listWorkspaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkspaces.asyncIterate( + this.innerApiCalls['listWorkspaces'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns the contents of a given Workspace directory. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry | DirectoryEntry}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `queryDirectoryContentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryDirectoryContents( + request?: protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[], + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest | null, + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse + ] + >; + queryDirectoryContents( + request: protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): void; + queryDirectoryContents( + request: protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): void; + queryDirectoryContents( + request?: protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[], + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest | null, + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.queryDirectoryContents( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry | DirectoryEntry} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `queryDirectoryContentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryDirectoryContentsStream( + request?: protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + const defaultCallSettings = this._defaults['queryDirectoryContents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryDirectoryContents.createStream( + this.innerApiCalls.queryDirectoryContents as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryDirectoryContents`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry | DirectoryEntry}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.query_directory_contents.js + * region_tag:dataform_v1alpha2_generated_Dataform_QueryDirectoryContents_async + */ + queryDirectoryContentsAsync( + request?: protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + const defaultCallSettings = this._defaults['queryDirectoryContents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryDirectoryContents.asyncIterate( + this.innerApiCalls['queryDirectoryContents'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists CompilationResults in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.CompilationResult | CompilationResult}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listCompilationResultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCompilationResults( + request?: protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResult[], + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest | null, + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsResponse + ] + >; + listCompilationResults( + request: protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1alpha2.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResult + > + ): void; + listCompilationResults( + request: protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1alpha2.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResult + > + ): void; + listCompilationResults( + request?: protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1alpha2.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResult + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1alpha2.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResult + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResult[], + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest | null, + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listCompilationResults( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.CompilationResult | CompilationResult} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listCompilationResultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCompilationResultsStream( + request?: protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listCompilationResults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCompilationResults.createStream( + this.innerApiCalls.listCompilationResults as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCompilationResults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1alpha2.CompilationResult | CompilationResult}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.list_compilation_results.js + * region_tag:dataform_v1alpha2_generated_Dataform_ListCompilationResults_async + */ + listCompilationResultsAsync( + request?: protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listCompilationResults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCompilationResults.asyncIterate( + this.innerApiCalls['listCompilationResults'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns CompilationResultActions in a given CompilationResult. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.CompilationResultAction | CompilationResultAction}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `queryCompilationResultActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryCompilationResultActions( + request?: protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResultAction[], + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest | null, + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse + ] + >; + queryCompilationResultActions( + request: protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResultAction + > + ): void; + queryCompilationResultActions( + request: protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResultAction + > + ): void; + queryCompilationResultActions( + request?: protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResultAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResultAction + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResultAction[], + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest | null, + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.queryCompilationResultActions( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.CompilationResultAction | CompilationResultAction} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `queryCompilationResultActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryCompilationResultActionsStream( + request?: protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + const defaultCallSettings = this._defaults['queryCompilationResultActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryCompilationResultActions.createStream( + this.innerApiCalls.queryCompilationResultActions as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryCompilationResultActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1alpha2.CompilationResultAction | CompilationResultAction}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.query_compilation_result_actions.js + * region_tag:dataform_v1alpha2_generated_Dataform_QueryCompilationResultActions_async + */ + queryCompilationResultActionsAsync( + request?: protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + const defaultCallSettings = this._defaults['queryCompilationResultActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryCompilationResultActions.asyncIterate( + this.innerApiCalls['queryCompilationResultActions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists WorkflowInvocations in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.WorkflowInvocation | WorkflowInvocation}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listWorkflowInvocationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkflowInvocations( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation[], + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest | null, + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse + ] + >; + listWorkflowInvocations( + request: protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation + > + ): void; + listWorkflowInvocations( + request: protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation + > + ): void; + listWorkflowInvocations( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation[], + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest | null, + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listWorkflowInvocations( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.WorkflowInvocation | WorkflowInvocation} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listWorkflowInvocationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkflowInvocationsStream( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listWorkflowInvocations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkflowInvocations.createStream( + this.innerApiCalls.listWorkflowInvocations as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listWorkflowInvocations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1alpha2.WorkflowInvocation | WorkflowInvocation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.list_workflow_invocations.js + * region_tag:dataform_v1alpha2_generated_Dataform_ListWorkflowInvocations_async + */ + listWorkflowInvocationsAsync( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listWorkflowInvocations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkflowInvocations.asyncIterate( + this.innerApiCalls['listWorkflowInvocations'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns WorkflowInvocationActions in a given WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction | WorkflowInvocationAction}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `queryWorkflowInvocationActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryWorkflowInvocationActions( + request?: protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[], + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest | null, + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse + ] + >; + queryWorkflowInvocationActions( + request: protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction + > + ): void; + queryWorkflowInvocationActions( + request: protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction + > + ): void; + queryWorkflowInvocationActions( + request?: protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[], + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest | null, + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.queryWorkflowInvocationActions( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction | WorkflowInvocationAction} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `queryWorkflowInvocationActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryWorkflowInvocationActionsStream( + request?: protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + const defaultCallSettings = + this._defaults['queryWorkflowInvocationActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryWorkflowInvocationActions.createStream( + this.innerApiCalls.queryWorkflowInvocationActions as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryWorkflowInvocationActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction | WorkflowInvocationAction}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js + * region_tag:dataform_v1alpha2_generated_Dataform_QueryWorkflowInvocationActions_async + */ + queryWorkflowInvocationActionsAsync( + request?: protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + const defaultCallSettings = + this._defaults['queryWorkflowInvocationActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryWorkflowInvocationActions.asyncIterate( + this.innerApiCalls['queryWorkflowInvocationActions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified compilationResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} compilation_result + * @returns {string} Resource name string. + */ + compilationResultPath( + project: string, + location: string, + repository: string, + compilationResult: string + ) { + return this.pathTemplates.compilationResultPathTemplate.render({ + project: project, + location: location, + repository: repository, + compilation_result: compilationResult, + }); + } + + /** + * Parse the project from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).project; + } + + /** + * Parse the location from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).location; + } + + /** + * Parse the repository from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).repository; + } + + /** + * Parse the compilation_result from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the compilation_result. + */ + matchCompilationResultFromCompilationResultName( + compilationResultName: string + ) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).compilation_result; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified repository resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @returns {string} Resource name string. + */ + repositoryPath(project: string, location: string, repository: string) { + return this.pathTemplates.repositoryPathTemplate.render({ + project: project, + location: location, + repository: repository, + }); + } + + /** + * Parse the project from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .project; + } + + /** + * Parse the location from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .location; + } + + /** + * Parse the repository from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .repository; + } + + /** + * Return a fully-qualified workflowInvocation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} workflow_invocation + * @returns {string} Resource name string. + */ + workflowInvocationPath( + project: string, + location: string, + repository: string, + workflowInvocation: string + ) { + return this.pathTemplates.workflowInvocationPathTemplate.render({ + project: project, + location: location, + repository: repository, + workflow_invocation: workflowInvocation, + }); + } + + /** + * Parse the project from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).project; + } + + /** + * Parse the location from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).location; + } + + /** + * Parse the repository from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).repository; + } + + /** + * Parse the workflow_invocation from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the workflow_invocation. + */ + matchWorkflowInvocationFromWorkflowInvocationName( + workflowInvocationName: string + ) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).workflow_invocation; + } + + /** + * Return a fully-qualified workspace resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} workspace + * @returns {string} Resource name string. + */ + workspacePath( + project: string, + location: string, + repository: string, + workspace: string + ) { + return this.pathTemplates.workspacePathTemplate.render({ + project: project, + location: location, + repository: repository, + workspace: workspace, + }); + } + + /** + * Parse the project from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .project; + } + + /** + * Parse the location from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .location; + } + + /** + * Parse the repository from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .repository; + } + + /** + * Parse the workspace from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the workspace. + */ + matchWorkspaceFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .workspace; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dataformStub && !this._terminated) { + return this.dataformStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-dataform/src/v1alpha2/dataform_client_config.json b/packages/google-cloud-dataform/src/v1alpha2/dataform_client_config.json new file mode 100644 index 00000000000..b52dc9c4ce3 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1alpha2/dataform_client_config.json @@ -0,0 +1,170 @@ +{ + "interfaces": { + "google.cloud.dataform.v1alpha2.Dataform": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListRepositories": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchRemoteBranches": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkspaces": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "InstallNpmPackages": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PullGitCommits": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PushGitCommits": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchFileGitStatuses": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchGitAheadBehind": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CommitWorkspaceChanges": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ResetWorkspaceChanges": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchFileDiff": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryDirectoryContents": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MakeDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MoveDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReadFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MoveFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "WriteFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListCompilationResults": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetCompilationResult": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateCompilationResult": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryCompilationResultActions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkflowInvocations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CancelWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryWorkflowInvocationActions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-dataform/src/v1alpha2/dataform_proto_list.json b/packages/google-cloud-dataform/src/v1alpha2/dataform_proto_list.json new file mode 100644 index 00000000000..78309dcf117 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1alpha2/dataform_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/dataform/v1alpha2/dataform.proto" +] diff --git a/packages/google-cloud-dataform/src/v1alpha2/gapic_metadata.json b/packages/google-cloud-dataform/src/v1alpha2/gapic_metadata.json new file mode 100644 index 00000000000..d0c680b57e8 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1alpha2/gapic_metadata.json @@ -0,0 +1,411 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.dataform.v1alpha2", + "libraryPackage": "@google-cloud/dataform", + "services": { + "Dataform": { + "clients": { + "grpc": { + "libraryClient": "DataformClient", + "rpcs": { + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "FetchRemoteBranches": { + "methods": [ + "fetchRemoteBranches" + ] + }, + "GetWorkspace": { + "methods": [ + "getWorkspace" + ] + }, + "CreateWorkspace": { + "methods": [ + "createWorkspace" + ] + }, + "DeleteWorkspace": { + "methods": [ + "deleteWorkspace" + ] + }, + "InstallNpmPackages": { + "methods": [ + "installNpmPackages" + ] + }, + "PullGitCommits": { + "methods": [ + "pullGitCommits" + ] + }, + "PushGitCommits": { + "methods": [ + "pushGitCommits" + ] + }, + "FetchFileGitStatuses": { + "methods": [ + "fetchFileGitStatuses" + ] + }, + "FetchGitAheadBehind": { + "methods": [ + "fetchGitAheadBehind" + ] + }, + "CommitWorkspaceChanges": { + "methods": [ + "commitWorkspaceChanges" + ] + }, + "ResetWorkspaceChanges": { + "methods": [ + "resetWorkspaceChanges" + ] + }, + "FetchFileDiff": { + "methods": [ + "fetchFileDiff" + ] + }, + "MakeDirectory": { + "methods": [ + "makeDirectory" + ] + }, + "RemoveDirectory": { + "methods": [ + "removeDirectory" + ] + }, + "MoveDirectory": { + "methods": [ + "moveDirectory" + ] + }, + "ReadFile": { + "methods": [ + "readFile" + ] + }, + "RemoveFile": { + "methods": [ + "removeFile" + ] + }, + "MoveFile": { + "methods": [ + "moveFile" + ] + }, + "WriteFile": { + "methods": [ + "writeFile" + ] + }, + "GetCompilationResult": { + "methods": [ + "getCompilationResult" + ] + }, + "CreateCompilationResult": { + "methods": [ + "createCompilationResult" + ] + }, + "GetWorkflowInvocation": { + "methods": [ + "getWorkflowInvocation" + ] + }, + "CreateWorkflowInvocation": { + "methods": [ + "createWorkflowInvocation" + ] + }, + "DeleteWorkflowInvocation": { + "methods": [ + "deleteWorkflowInvocation" + ] + }, + "CancelWorkflowInvocation": { + "methods": [ + "cancelWorkflowInvocation" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListWorkspaces": { + "methods": [ + "listWorkspaces", + "listWorkspacesStream", + "listWorkspacesAsync" + ] + }, + "QueryDirectoryContents": { + "methods": [ + "queryDirectoryContents", + "queryDirectoryContentsStream", + "queryDirectoryContentsAsync" + ] + }, + "ListCompilationResults": { + "methods": [ + "listCompilationResults", + "listCompilationResultsStream", + "listCompilationResultsAsync" + ] + }, + "QueryCompilationResultActions": { + "methods": [ + "queryCompilationResultActions", + "queryCompilationResultActionsStream", + "queryCompilationResultActionsAsync" + ] + }, + "ListWorkflowInvocations": { + "methods": [ + "listWorkflowInvocations", + "listWorkflowInvocationsStream", + "listWorkflowInvocationsAsync" + ] + }, + "QueryWorkflowInvocationActions": { + "methods": [ + "queryWorkflowInvocationActions", + "queryWorkflowInvocationActionsStream", + "queryWorkflowInvocationActionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataformClient", + "rpcs": { + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "FetchRemoteBranches": { + "methods": [ + "fetchRemoteBranches" + ] + }, + "GetWorkspace": { + "methods": [ + "getWorkspace" + ] + }, + "CreateWorkspace": { + "methods": [ + "createWorkspace" + ] + }, + "DeleteWorkspace": { + "methods": [ + "deleteWorkspace" + ] + }, + "InstallNpmPackages": { + "methods": [ + "installNpmPackages" + ] + }, + "PullGitCommits": { + "methods": [ + "pullGitCommits" + ] + }, + "PushGitCommits": { + "methods": [ + "pushGitCommits" + ] + }, + "FetchFileGitStatuses": { + "methods": [ + "fetchFileGitStatuses" + ] + }, + "FetchGitAheadBehind": { + "methods": [ + "fetchGitAheadBehind" + ] + }, + "CommitWorkspaceChanges": { + "methods": [ + "commitWorkspaceChanges" + ] + }, + "ResetWorkspaceChanges": { + "methods": [ + "resetWorkspaceChanges" + ] + }, + "FetchFileDiff": { + "methods": [ + "fetchFileDiff" + ] + }, + "MakeDirectory": { + "methods": [ + "makeDirectory" + ] + }, + "RemoveDirectory": { + "methods": [ + "removeDirectory" + ] + }, + "MoveDirectory": { + "methods": [ + "moveDirectory" + ] + }, + "ReadFile": { + "methods": [ + "readFile" + ] + }, + "RemoveFile": { + "methods": [ + "removeFile" + ] + }, + "MoveFile": { + "methods": [ + "moveFile" + ] + }, + "WriteFile": { + "methods": [ + "writeFile" + ] + }, + "GetCompilationResult": { + "methods": [ + "getCompilationResult" + ] + }, + "CreateCompilationResult": { + "methods": [ + "createCompilationResult" + ] + }, + "GetWorkflowInvocation": { + "methods": [ + "getWorkflowInvocation" + ] + }, + "CreateWorkflowInvocation": { + "methods": [ + "createWorkflowInvocation" + ] + }, + "DeleteWorkflowInvocation": { + "methods": [ + "deleteWorkflowInvocation" + ] + }, + "CancelWorkflowInvocation": { + "methods": [ + "cancelWorkflowInvocation" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListWorkspaces": { + "methods": [ + "listWorkspaces", + "listWorkspacesStream", + "listWorkspacesAsync" + ] + }, + "QueryDirectoryContents": { + "methods": [ + "queryDirectoryContents", + "queryDirectoryContentsStream", + "queryDirectoryContentsAsync" + ] + }, + "ListCompilationResults": { + "methods": [ + "listCompilationResults", + "listCompilationResultsStream", + "listCompilationResultsAsync" + ] + }, + "QueryCompilationResultActions": { + "methods": [ + "queryCompilationResultActions", + "queryCompilationResultActionsStream", + "queryCompilationResultActionsAsync" + ] + }, + "ListWorkflowInvocations": { + "methods": [ + "listWorkflowInvocations", + "listWorkflowInvocationsStream", + "listWorkflowInvocationsAsync" + ] + }, + "QueryWorkflowInvocationActions": { + "methods": [ + "queryWorkflowInvocationActions", + "queryWorkflowInvocationActionsStream", + "queryWorkflowInvocationActionsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-dataform/src/v1alpha2/index.ts b/packages/google-cloud-dataform/src/v1alpha2/index.ts new file mode 100644 index 00000000000..20185442e0c --- /dev/null +++ b/packages/google-cloud-dataform/src/v1alpha2/index.ts @@ -0,0 +1,19 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {DataformClient} from './dataform_client'; diff --git a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts new file mode 100644 index 00000000000..8ef465478cd --- /dev/null +++ b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts @@ -0,0 +1,5312 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/dataform_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './dataform_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Dataform is a service to develop, create, document, test, and update curated + * tables in BigQuery. + * @class + * @memberof v1beta1 + */ +export class DataformClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + dataformStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataformClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataformClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataformClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + compilationResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + repositoryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}' + ), + workflowInvocationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}' + ), + workspacePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listRepositories: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'repositories' + ), + listWorkspaces: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workspaces' + ), + queryDirectoryContents: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'directoryEntries' + ), + listCompilationResults: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'compilationResults' + ), + queryCompilationResultActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'compilationResultActions' + ), + listWorkflowInvocations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workflowInvocations' + ), + queryWorkflowInvocationActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workflowInvocationActions' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataform.v1beta1.Dataform', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataformStub) { + return this.dataformStub; + } + + // Put together the "service stub" for + // google.cloud.dataform.v1beta1.Dataform. + this.dataformStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dataform.v1beta1.Dataform' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataform.v1beta1.Dataform, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const dataformStubMethods = [ + 'listRepositories', + 'getRepository', + 'createRepository', + 'updateRepository', + 'deleteRepository', + 'fetchRemoteBranches', + 'listWorkspaces', + 'getWorkspace', + 'createWorkspace', + 'deleteWorkspace', + 'installNpmPackages', + 'pullGitCommits', + 'pushGitCommits', + 'fetchFileGitStatuses', + 'fetchGitAheadBehind', + 'commitWorkspaceChanges', + 'resetWorkspaceChanges', + 'fetchFileDiff', + 'queryDirectoryContents', + 'makeDirectory', + 'removeDirectory', + 'moveDirectory', + 'readFile', + 'removeFile', + 'moveFile', + 'writeFile', + 'listCompilationResults', + 'getCompilationResult', + 'createCompilationResult', + 'queryCompilationResultActions', + 'listWorkflowInvocations', + 'getWorkflowInvocation', + 'createWorkflowInvocation', + 'deleteWorkflowInvocation', + 'cancelWorkflowInvocation', + 'queryWorkflowInvocationActions', + ]; + for (const methodName of dataformStubMethods) { + const callPromise = this.dataformStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataformStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dataform.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dataform.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Fetches a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.Repository | Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.get_repository.js + * region_tag:dataform_v1beta1_generated_Dataform_GetRepository_async + */ + getRepository( + request?: protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest | undefined, + {} | undefined + ] + >; + getRepository( + request: protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getRepository( + request: protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getRepository( + request?: protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getRepository(request, options, callback); + } + /** + * Creates a new Repository in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to create the repository. Must be in the format + * `projects/* /locations/*`. + * @param {google.cloud.dataform.v1beta1.Repository} request.repository + * Required. The repository to create. + * @param {string} request.repositoryId + * Required. The ID to use for the repository, which will become the final component of + * the repository's resource name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.Repository | Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.create_repository.js + * region_tag:dataform_v1beta1_generated_Dataform_CreateRepository_async + */ + createRepository( + request?: protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest | undefined, + {} | undefined + ] + >; + createRepository( + request: protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createRepository( + request: protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createRepository( + request?: protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createRepository(request, options, callback); + } + /** + * Updates a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Specifies the fields to be updated in the repository. If left unset, + * all fields will be updated. + * @param {google.cloud.dataform.v1beta1.Repository} request.repository + * Required. The repository to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.Repository | Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.update_repository.js + * region_tag:dataform_v1beta1_generated_Dataform_UpdateRepository_async + */ + updateRepository( + request?: protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest | undefined, + {} | undefined + ] + >; + updateRepository( + request: protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateRepository( + request: protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateRepository( + request?: protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'repository.name': request.repository!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateRepository(request, options, callback); + } + /** + * Deletes a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @param {boolean} request.force + * If set to true, any child resources of this repository will also be + * deleted. (Otherwise, the request will only succeed if the repository has no + * child resources.) + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.delete_repository.js + * region_tag:dataform_v1beta1_generated_Dataform_DeleteRepository_async + */ + deleteRepository( + request?: protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest | undefined, + {} | undefined + ] + >; + deleteRepository( + request: protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request: protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request?: protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteRepository(request, options, callback); + } + /** + * Fetches a Repository's remote branches. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse | FetchRemoteBranchesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.fetch_remote_branches.js + * region_tag:dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async + */ + fetchRemoteBranches( + request?: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | undefined + ), + {} | undefined + ] + >; + fetchRemoteBranches( + request: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchRemoteBranches( + request: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchRemoteBranches( + request?: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchRemoteBranches(request, options, callback); + } + /** + * Fetches a single Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.Workspace | Workspace}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.get_workspace.js + * region_tag:dataform_v1beta1_generated_Dataform_GetWorkspace_async + */ + getWorkspace( + request?: protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace, + protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest | undefined, + {} | undefined + ] + >; + getWorkspace( + request: protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkspace( + request: protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkspace( + request?: protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace, + protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getWorkspace(request, options, callback); + } + /** + * Creates a new Workspace in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the workspace. Must be in the format + * `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1beta1.Workspace} request.workspace + * Required. The workspace to create. + * @param {string} request.workspaceId + * Required. The ID to use for the workspace, which will become the final component of + * the workspace's resource name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.Workspace | Workspace}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.create_workspace.js + * region_tag:dataform_v1beta1_generated_Dataform_CreateWorkspace_async + */ + createWorkspace( + request?: protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace, + protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest | undefined, + {} | undefined + ] + >; + createWorkspace( + request: protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkspace( + request: protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkspace( + request?: protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace, + protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createWorkspace(request, options, callback); + } + /** + * Deletes a single Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.delete_workspace.js + * region_tag:dataform_v1beta1_generated_Dataform_DeleteWorkspace_async + */ + deleteWorkspace( + request?: protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest | undefined, + {} | undefined + ] + >; + deleteWorkspace( + request: protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkspace( + request: protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkspace( + request?: protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteWorkspace(request, options, callback); + } + /** + * Installs dependency NPM packages (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse | InstallNpmPackagesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.install_npm_packages.js + * region_tag:dataform_v1beta1_generated_Dataform_InstallNpmPackages_async + */ + installNpmPackages( + request?: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | undefined + ), + {} | undefined + ] + >; + installNpmPackages( + request: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + installNpmPackages( + request: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + installNpmPackages( + request?: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.installNpmPackages(request, options, callback); + } + /** + * Pulls Git commits from the Repository's remote into a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote from which to pull commits. + * If left unset, the repository's default branch name will be used. + * @param {google.cloud.dataform.v1beta1.CommitAuthor} request.author + * Required. The author of any merge commit which may be created as a result of merging + * fetched Git commits into this workspace. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.pull_git_commits.js + * region_tag:dataform_v1beta1_generated_Dataform_PullGitCommits_async + */ + pullGitCommits( + request?: protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest | undefined, + {} | undefined + ] + >; + pullGitCommits( + request: protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pullGitCommits( + request: protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pullGitCommits( + request?: protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.pullGitCommits(request, options, callback); + } + /** + * Pushes Git commits from a Workspace to the Repository's remote. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote to which commits should be pushed. + * If left unset, the repository's default branch name will be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.push_git_commits.js + * region_tag:dataform_v1beta1_generated_Dataform_PushGitCommits_async + */ + pushGitCommits( + request?: protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest | undefined, + {} | undefined + ] + >; + pushGitCommits( + request: protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pushGitCommits( + request: protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pushGitCommits( + request?: protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.pushGitCommits(request, options, callback); + } + /** + * Fetches Git statuses for the files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse | FetchFileGitStatusesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.fetch_file_git_statuses.js + * region_tag:dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async + */ + fetchFileGitStatuses( + request?: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | undefined + ), + {} | undefined + ] + >; + fetchFileGitStatuses( + request: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileGitStatuses( + request: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileGitStatuses( + request?: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchFileGitStatuses(request, options, callback); + } + /** + * Fetches Git ahead/behind against a remote branch. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote against which this workspace + * should be compared. If left unset, the repository's default branch name + * will be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse | FetchGitAheadBehindResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js + * region_tag:dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async + */ + fetchGitAheadBehind( + request?: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | undefined + ), + {} | undefined + ] + >; + fetchGitAheadBehind( + request: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchGitAheadBehind( + request: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchGitAheadBehind( + request?: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchGitAheadBehind(request, options, callback); + } + /** + * Applies a Git commit for uncommitted files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {google.cloud.dataform.v1beta1.CommitAuthor} request.author + * Required. The commit's author. + * @param {string} [request.commitMessage] + * Optional. The commit's message. + * @param {string[]} [request.paths] + * Optional. Full file paths to commit including filename, rooted at workspace root. If + * left empty, all files will be committed. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.commit_workspace_changes.js + * region_tag:dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async + */ + commitWorkspaceChanges( + request?: protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + >; + commitWorkspaceChanges( + request: protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + commitWorkspaceChanges( + request: protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + commitWorkspaceChanges( + request?: protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.commitWorkspaceChanges( + request, + options, + callback + ); + } + /** + * Performs a Git reset for uncommitted files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string[]} [request.paths] + * Optional. Full file paths to reset back to their committed state including filename, + * rooted at workspace root. If left empty, all files will be reset. + * @param {boolean} [request.clean] + * Optional. If set to true, untracked files will be deleted. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.reset_workspace_changes.js + * region_tag:dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async + */ + resetWorkspaceChanges( + request?: protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + >; + resetWorkspaceChanges( + request: protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resetWorkspaceChanges( + request: protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resetWorkspaceChanges( + request?: protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.resetWorkspaceChanges(request, options, callback); + } + /** + * Fetches Git diff for an uncommitted file in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse | FetchFileDiffResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.fetch_file_diff.js + * region_tag:dataform_v1beta1_generated_Dataform_FetchFileDiff_async + */ + fetchFileDiff( + request?: protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest | undefined, + {} | undefined + ] + >; + fetchFileDiff( + request: protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileDiff( + request: protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileDiff( + request?: protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchFileDiff(request, options, callback); + } + /** + * Creates a directory inside a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse | MakeDirectoryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.make_directory.js + * region_tag:dataform_v1beta1_generated_Dataform_MakeDirectory_async + */ + makeDirectory( + request?: protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest | undefined, + {} | undefined + ] + >; + makeDirectory( + request: protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + makeDirectory( + request: protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + makeDirectory( + request?: protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.makeDirectory(request, options, callback); + } + /** + * Deletes a directory (inside a Workspace) and all of its contents. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.remove_directory.js + * region_tag:dataform_v1beta1_generated_Dataform_RemoveDirectory_async + */ + removeDirectory( + request?: protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest | undefined, + {} | undefined + ] + >; + removeDirectory( + request: protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeDirectory( + request: protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeDirectory( + request?: protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.removeDirectory(request, options, callback); + } + /** + * Moves a directory (inside a Workspace), and all of its contents, to a new + * location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {string} request.newPath + * Required. The new path for the directory including directory name, rooted at + * workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse | MoveDirectoryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.move_directory.js + * region_tag:dataform_v1beta1_generated_Dataform_MoveDirectory_async + */ + moveDirectory( + request?: protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest | undefined, + {} | undefined + ] + >; + moveDirectory( + request: protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + moveDirectory( + request: protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + moveDirectory( + request?: protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.moveDirectory(request, options, callback); + } + /** + * Returns the contents of a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.ReadFileResponse | ReadFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.read_file.js + * region_tag:dataform_v1beta1_generated_Dataform_ReadFile_async + */ + readFile( + request?: protos.google.cloud.dataform.v1beta1.IReadFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | undefined, + {} | undefined + ] + >; + readFile( + request: protos.google.cloud.dataform.v1beta1.IReadFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): void; + readFile( + request: protos.google.cloud.dataform.v1beta1.IReadFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): void; + readFile( + request?: protos.google.cloud.dataform.v1beta1.IReadFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + | protos.google.cloud.dataform.v1beta1.IReadFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.readFile(request, options, callback); + } + /** + * Deletes a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.remove_file.js + * region_tag:dataform_v1beta1_generated_Dataform_RemoveFile_async + */ + removeFile( + request?: protos.google.cloud.dataform.v1beta1.IRemoveFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IRemoveFileRequest | undefined, + {} | undefined + ] + >; + removeFile( + request: protos.google.cloud.dataform.v1beta1.IRemoveFileRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeFile( + request: protos.google.cloud.dataform.v1beta1.IRemoveFileRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeFile( + request?: protos.google.cloud.dataform.v1beta1.IRemoveFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IRemoveFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.removeFile(request, options, callback); + } + /** + * Moves a file (inside a Workspace) to a new location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {string} request.newPath + * Required. The file's new path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.MoveFileResponse | MoveFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.move_file.js + * region_tag:dataform_v1beta1_generated_Dataform_MoveFile_async + */ + moveFile( + request?: protos.google.cloud.dataform.v1beta1.IMoveFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | undefined, + {} | undefined + ] + >; + moveFile( + request: protos.google.cloud.dataform.v1beta1.IMoveFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): void; + moveFile( + request: protos.google.cloud.dataform.v1beta1.IMoveFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): void; + moveFile( + request?: protos.google.cloud.dataform.v1beta1.IMoveFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + | protos.google.cloud.dataform.v1beta1.IMoveFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.moveFile(request, options, callback); + } + /** + * Writes to a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file. + * @param {Buffer} request.contents + * Required. The file's contents. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.WriteFileResponse | WriteFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.write_file.js + * region_tag:dataform_v1beta1_generated_Dataform_WriteFile_async + */ + writeFile( + request?: protos.google.cloud.dataform.v1beta1.IWriteFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | undefined, + {} | undefined + ] + >; + writeFile( + request: protos.google.cloud.dataform.v1beta1.IWriteFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | null | undefined, + {} | null | undefined + > + ): void; + writeFile( + request: protos.google.cloud.dataform.v1beta1.IWriteFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | null | undefined, + {} | null | undefined + > + ): void; + writeFile( + request?: protos.google.cloud.dataform.v1beta1.IWriteFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + | protos.google.cloud.dataform.v1beta1.IWriteFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.writeFile(request, options, callback); + } + /** + * Fetches a single CompilationResult. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.CompilationResult | CompilationResult}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.get_compilation_result.js + * region_tag:dataform_v1beta1_generated_Dataform_GetCompilationResult_async + */ + getCompilationResult( + request?: protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult, + ( + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | undefined + ), + {} | undefined + ] + >; + getCompilationResult( + request: protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCompilationResult( + request: protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCompilationResult( + request?: protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult, + ( + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getCompilationResult(request, options, callback); + } + /** + * Creates a new CompilationResult in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the compilation result. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1beta1.CompilationResult} request.compilationResult + * Required. The compilation result to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.CompilationResult | CompilationResult}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.create_compilation_result.js + * region_tag:dataform_v1beta1_generated_Dataform_CreateCompilationResult_async + */ + createCompilationResult( + request?: protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult, + ( + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | undefined + ), + {} | undefined + ] + >; + createCompilationResult( + request: protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCompilationResult( + request: protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCompilationResult( + request?: protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult, + ( + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createCompilationResult( + request, + options, + callback + ); + } + /** + * Fetches a single WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.WorkflowInvocation | WorkflowInvocation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.get_workflow_invocation.js + * region_tag:dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async + */ + getWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + getWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getWorkflowInvocation(request, options, callback); + } + /** + * Creates a new WorkflowInvocation in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the workflow invocation. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation} request.workflowInvocation + * Required. The workflow invocation resource to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.WorkflowInvocation | WorkflowInvocation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.create_workflow_invocation.js + * region_tag:dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async + */ + createWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + createWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createWorkflowInvocation( + request, + options, + callback + ); + } + /** + * Deletes a single WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.delete_workflow_invocation.js + * region_tag:dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async + */ + deleteWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + deleteWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteWorkflowInvocation( + request, + options, + callback + ); + } + /** + * Requests cancellation of a running WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.cancel_workflow_invocation.js + * region_tag:dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async + */ + cancelWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + cancelWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.cancelWorkflowInvocation( + request, + options, + callback + ); + } + + /** + * Lists Repositories in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.Repository | Repository}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRepositories( + request?: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository[], + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest | null, + protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + ] + >; + listRepositories( + request: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IRepository + > + ): void; + listRepositories( + request: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IRepository + > + ): void; + listRepositories( + request?: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IRepository + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IRepository + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository[], + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest | null, + protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listRepositories(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.Repository | Repository} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRepositoriesStream( + request?: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.createStream( + this.innerApiCalls.listRepositories as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listRepositories`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1beta1.Repository | Repository}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.list_repositories.js + * region_tag:dataform_v1beta1_generated_Dataform_ListRepositories_async + */ + listRepositoriesAsync( + request?: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.asyncIterate( + this.innerApiCalls['listRepositories'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Workspaces in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.Workspace | Workspace}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listWorkspacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkspaces( + request?: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace[], + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest | null, + protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + ] + >; + listWorkspaces( + request: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkspace + > + ): void; + listWorkspaces( + request: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkspace + > + ): void; + listWorkspaces( + request?: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkspace + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkspace + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace[], + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest | null, + protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listWorkspaces(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.Workspace | Workspace} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listWorkspacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkspacesStream( + request?: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listWorkspaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkspaces.createStream( + this.innerApiCalls.listWorkspaces as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listWorkspaces`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1beta1.Workspace | Workspace}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.list_workspaces.js + * region_tag:dataform_v1beta1_generated_Dataform_ListWorkspaces_async + */ + listWorkspacesAsync( + request?: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listWorkspaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkspaces.asyncIterate( + this.innerApiCalls['listWorkspaces'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns the contents of a given Workspace directory. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry | DirectoryEntry}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `queryDirectoryContentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryDirectoryContents( + request?: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[], + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + ] + >; + queryDirectoryContents( + request: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): void; + queryDirectoryContents( + request: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): void; + queryDirectoryContents( + request?: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[], + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.queryDirectoryContents( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry | DirectoryEntry} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `queryDirectoryContentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryDirectoryContentsStream( + request?: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + const defaultCallSettings = this._defaults['queryDirectoryContents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryDirectoryContents.createStream( + this.innerApiCalls.queryDirectoryContents as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryDirectoryContents`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry | DirectoryEntry}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.query_directory_contents.js + * region_tag:dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async + */ + queryDirectoryContentsAsync( + request?: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + workspace: request.workspace ?? '', + }); + const defaultCallSettings = this._defaults['queryDirectoryContents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryDirectoryContents.asyncIterate( + this.innerApiCalls['queryDirectoryContents'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists CompilationResults in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.CompilationResult | CompilationResult}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listCompilationResultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCompilationResults( + request?: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult[], + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest | null, + protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + ] + >; + listCompilationResults( + request: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResult + > + ): void; + listCompilationResults( + request: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResult + > + ): void; + listCompilationResults( + request?: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResult + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResult + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult[], + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest | null, + protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listCompilationResults( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.CompilationResult | CompilationResult} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listCompilationResultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCompilationResultsStream( + request?: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listCompilationResults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCompilationResults.createStream( + this.innerApiCalls.listCompilationResults as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCompilationResults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1beta1.CompilationResult | CompilationResult}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.list_compilation_results.js + * region_tag:dataform_v1beta1_generated_Dataform_ListCompilationResults_async + */ + listCompilationResultsAsync( + request?: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listCompilationResults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCompilationResults.asyncIterate( + this.innerApiCalls['listCompilationResults'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns CompilationResultActions in a given CompilationResult. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.CompilationResultAction | CompilationResultAction}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `queryCompilationResultActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryCompilationResultActions( + request?: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResultAction[], + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + ] + >; + queryCompilationResultActions( + request: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResultAction + > + ): void; + queryCompilationResultActions( + request: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResultAction + > + ): void; + queryCompilationResultActions( + request?: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResultAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResultAction + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResultAction[], + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.queryCompilationResultActions( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.CompilationResultAction | CompilationResultAction} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `queryCompilationResultActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryCompilationResultActionsStream( + request?: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + const defaultCallSettings = this._defaults['queryCompilationResultActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryCompilationResultActions.createStream( + this.innerApiCalls.queryCompilationResultActions as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryCompilationResultActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1beta1.CompilationResultAction | CompilationResultAction}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.query_compilation_result_actions.js + * region_tag:dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async + */ + queryCompilationResultActionsAsync( + request?: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + const defaultCallSettings = this._defaults['queryCompilationResultActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryCompilationResultActions.asyncIterate( + this.innerApiCalls['queryCompilationResultActions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists WorkflowInvocations in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.WorkflowInvocation | WorkflowInvocation}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listWorkflowInvocationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkflowInvocations( + request?: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[], + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest | null, + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + ] + >; + listWorkflowInvocations( + request: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation + > + ): void; + listWorkflowInvocations( + request: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation + > + ): void; + listWorkflowInvocations( + request?: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[], + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest | null, + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listWorkflowInvocations( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.WorkflowInvocation | WorkflowInvocation} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listWorkflowInvocationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkflowInvocationsStream( + request?: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listWorkflowInvocations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkflowInvocations.createStream( + this.innerApiCalls.listWorkflowInvocations as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listWorkflowInvocations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1beta1.WorkflowInvocation | WorkflowInvocation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.list_workflow_invocations.js + * region_tag:dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async + */ + listWorkflowInvocationsAsync( + request?: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listWorkflowInvocations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkflowInvocations.asyncIterate( + this.innerApiCalls['listWorkflowInvocations'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns WorkflowInvocationActions in a given WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction | WorkflowInvocationAction}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `queryWorkflowInvocationActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryWorkflowInvocationActions( + request?: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[], + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + ] + >; + queryWorkflowInvocationActions( + request: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction + > + ): void; + queryWorkflowInvocationActions( + request: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction + > + ): void; + queryWorkflowInvocationActions( + request?: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[], + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.queryWorkflowInvocationActions( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction | WorkflowInvocationAction} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `queryWorkflowInvocationActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryWorkflowInvocationActionsStream( + request?: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + const defaultCallSettings = + this._defaults['queryWorkflowInvocationActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryWorkflowInvocationActions.createStream( + this.innerApiCalls.queryWorkflowInvocationActions as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryWorkflowInvocationActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction | WorkflowInvocationAction}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js + * region_tag:dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async + */ + queryWorkflowInvocationActionsAsync( + request?: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + const defaultCallSettings = + this._defaults['queryWorkflowInvocationActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryWorkflowInvocationActions.asyncIterate( + this.innerApiCalls['queryWorkflowInvocationActions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified compilationResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} compilation_result + * @returns {string} Resource name string. + */ + compilationResultPath( + project: string, + location: string, + repository: string, + compilationResult: string + ) { + return this.pathTemplates.compilationResultPathTemplate.render({ + project: project, + location: location, + repository: repository, + compilation_result: compilationResult, + }); + } + + /** + * Parse the project from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).project; + } + + /** + * Parse the location from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).location; + } + + /** + * Parse the repository from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).repository; + } + + /** + * Parse the compilation_result from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the compilation_result. + */ + matchCompilationResultFromCompilationResultName( + compilationResultName: string + ) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).compilation_result; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified repository resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @returns {string} Resource name string. + */ + repositoryPath(project: string, location: string, repository: string) { + return this.pathTemplates.repositoryPathTemplate.render({ + project: project, + location: location, + repository: repository, + }); + } + + /** + * Parse the project from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .project; + } + + /** + * Parse the location from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .location; + } + + /** + * Parse the repository from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .repository; + } + + /** + * Return a fully-qualified workflowInvocation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} workflow_invocation + * @returns {string} Resource name string. + */ + workflowInvocationPath( + project: string, + location: string, + repository: string, + workflowInvocation: string + ) { + return this.pathTemplates.workflowInvocationPathTemplate.render({ + project: project, + location: location, + repository: repository, + workflow_invocation: workflowInvocation, + }); + } + + /** + * Parse the project from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).project; + } + + /** + * Parse the location from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).location; + } + + /** + * Parse the repository from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).repository; + } + + /** + * Parse the workflow_invocation from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the workflow_invocation. + */ + matchWorkflowInvocationFromWorkflowInvocationName( + workflowInvocationName: string + ) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).workflow_invocation; + } + + /** + * Return a fully-qualified workspace resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} workspace + * @returns {string} Resource name string. + */ + workspacePath( + project: string, + location: string, + repository: string, + workspace: string + ) { + return this.pathTemplates.workspacePathTemplate.render({ + project: project, + location: location, + repository: repository, + workspace: workspace, + }); + } + + /** + * Parse the project from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .project; + } + + /** + * Parse the location from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .location; + } + + /** + * Parse the repository from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .repository; + } + + /** + * Parse the workspace from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the workspace. + */ + matchWorkspaceFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .workspace; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dataformStub && !this._terminated) { + return this.dataformStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-dataform/src/v1beta1/dataform_client_config.json b/packages/google-cloud-dataform/src/v1beta1/dataform_client_config.json new file mode 100644 index 00000000000..6e6161397a7 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1beta1/dataform_client_config.json @@ -0,0 +1,170 @@ +{ + "interfaces": { + "google.cloud.dataform.v1beta1.Dataform": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListRepositories": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchRemoteBranches": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkspaces": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "InstallNpmPackages": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PullGitCommits": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PushGitCommits": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchFileGitStatuses": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchGitAheadBehind": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CommitWorkspaceChanges": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ResetWorkspaceChanges": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchFileDiff": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryDirectoryContents": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MakeDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MoveDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReadFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MoveFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "WriteFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListCompilationResults": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetCompilationResult": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateCompilationResult": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryCompilationResultActions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkflowInvocations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CancelWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryWorkflowInvocationActions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-dataform/src/v1beta1/dataform_proto_list.json b/packages/google-cloud-dataform/src/v1beta1/dataform_proto_list.json new file mode 100644 index 00000000000..8e9b5e1395c --- /dev/null +++ b/packages/google-cloud-dataform/src/v1beta1/dataform_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/dataform/v1beta1/dataform.proto" +] diff --git a/packages/google-cloud-dataform/src/v1beta1/gapic_metadata.json b/packages/google-cloud-dataform/src/v1beta1/gapic_metadata.json new file mode 100644 index 00000000000..72fc33e7959 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1beta1/gapic_metadata.json @@ -0,0 +1,411 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.dataform.v1beta1", + "libraryPackage": "@google-cloud/dataform", + "services": { + "Dataform": { + "clients": { + "grpc": { + "libraryClient": "DataformClient", + "rpcs": { + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "FetchRemoteBranches": { + "methods": [ + "fetchRemoteBranches" + ] + }, + "GetWorkspace": { + "methods": [ + "getWorkspace" + ] + }, + "CreateWorkspace": { + "methods": [ + "createWorkspace" + ] + }, + "DeleteWorkspace": { + "methods": [ + "deleteWorkspace" + ] + }, + "InstallNpmPackages": { + "methods": [ + "installNpmPackages" + ] + }, + "PullGitCommits": { + "methods": [ + "pullGitCommits" + ] + }, + "PushGitCommits": { + "methods": [ + "pushGitCommits" + ] + }, + "FetchFileGitStatuses": { + "methods": [ + "fetchFileGitStatuses" + ] + }, + "FetchGitAheadBehind": { + "methods": [ + "fetchGitAheadBehind" + ] + }, + "CommitWorkspaceChanges": { + "methods": [ + "commitWorkspaceChanges" + ] + }, + "ResetWorkspaceChanges": { + "methods": [ + "resetWorkspaceChanges" + ] + }, + "FetchFileDiff": { + "methods": [ + "fetchFileDiff" + ] + }, + "MakeDirectory": { + "methods": [ + "makeDirectory" + ] + }, + "RemoveDirectory": { + "methods": [ + "removeDirectory" + ] + }, + "MoveDirectory": { + "methods": [ + "moveDirectory" + ] + }, + "ReadFile": { + "methods": [ + "readFile" + ] + }, + "RemoveFile": { + "methods": [ + "removeFile" + ] + }, + "MoveFile": { + "methods": [ + "moveFile" + ] + }, + "WriteFile": { + "methods": [ + "writeFile" + ] + }, + "GetCompilationResult": { + "methods": [ + "getCompilationResult" + ] + }, + "CreateCompilationResult": { + "methods": [ + "createCompilationResult" + ] + }, + "GetWorkflowInvocation": { + "methods": [ + "getWorkflowInvocation" + ] + }, + "CreateWorkflowInvocation": { + "methods": [ + "createWorkflowInvocation" + ] + }, + "DeleteWorkflowInvocation": { + "methods": [ + "deleteWorkflowInvocation" + ] + }, + "CancelWorkflowInvocation": { + "methods": [ + "cancelWorkflowInvocation" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListWorkspaces": { + "methods": [ + "listWorkspaces", + "listWorkspacesStream", + "listWorkspacesAsync" + ] + }, + "QueryDirectoryContents": { + "methods": [ + "queryDirectoryContents", + "queryDirectoryContentsStream", + "queryDirectoryContentsAsync" + ] + }, + "ListCompilationResults": { + "methods": [ + "listCompilationResults", + "listCompilationResultsStream", + "listCompilationResultsAsync" + ] + }, + "QueryCompilationResultActions": { + "methods": [ + "queryCompilationResultActions", + "queryCompilationResultActionsStream", + "queryCompilationResultActionsAsync" + ] + }, + "ListWorkflowInvocations": { + "methods": [ + "listWorkflowInvocations", + "listWorkflowInvocationsStream", + "listWorkflowInvocationsAsync" + ] + }, + "QueryWorkflowInvocationActions": { + "methods": [ + "queryWorkflowInvocationActions", + "queryWorkflowInvocationActionsStream", + "queryWorkflowInvocationActionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataformClient", + "rpcs": { + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "FetchRemoteBranches": { + "methods": [ + "fetchRemoteBranches" + ] + }, + "GetWorkspace": { + "methods": [ + "getWorkspace" + ] + }, + "CreateWorkspace": { + "methods": [ + "createWorkspace" + ] + }, + "DeleteWorkspace": { + "methods": [ + "deleteWorkspace" + ] + }, + "InstallNpmPackages": { + "methods": [ + "installNpmPackages" + ] + }, + "PullGitCommits": { + "methods": [ + "pullGitCommits" + ] + }, + "PushGitCommits": { + "methods": [ + "pushGitCommits" + ] + }, + "FetchFileGitStatuses": { + "methods": [ + "fetchFileGitStatuses" + ] + }, + "FetchGitAheadBehind": { + "methods": [ + "fetchGitAheadBehind" + ] + }, + "CommitWorkspaceChanges": { + "methods": [ + "commitWorkspaceChanges" + ] + }, + "ResetWorkspaceChanges": { + "methods": [ + "resetWorkspaceChanges" + ] + }, + "FetchFileDiff": { + "methods": [ + "fetchFileDiff" + ] + }, + "MakeDirectory": { + "methods": [ + "makeDirectory" + ] + }, + "RemoveDirectory": { + "methods": [ + "removeDirectory" + ] + }, + "MoveDirectory": { + "methods": [ + "moveDirectory" + ] + }, + "ReadFile": { + "methods": [ + "readFile" + ] + }, + "RemoveFile": { + "methods": [ + "removeFile" + ] + }, + "MoveFile": { + "methods": [ + "moveFile" + ] + }, + "WriteFile": { + "methods": [ + "writeFile" + ] + }, + "GetCompilationResult": { + "methods": [ + "getCompilationResult" + ] + }, + "CreateCompilationResult": { + "methods": [ + "createCompilationResult" + ] + }, + "GetWorkflowInvocation": { + "methods": [ + "getWorkflowInvocation" + ] + }, + "CreateWorkflowInvocation": { + "methods": [ + "createWorkflowInvocation" + ] + }, + "DeleteWorkflowInvocation": { + "methods": [ + "deleteWorkflowInvocation" + ] + }, + "CancelWorkflowInvocation": { + "methods": [ + "cancelWorkflowInvocation" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListWorkspaces": { + "methods": [ + "listWorkspaces", + "listWorkspacesStream", + "listWorkspacesAsync" + ] + }, + "QueryDirectoryContents": { + "methods": [ + "queryDirectoryContents", + "queryDirectoryContentsStream", + "queryDirectoryContentsAsync" + ] + }, + "ListCompilationResults": { + "methods": [ + "listCompilationResults", + "listCompilationResultsStream", + "listCompilationResultsAsync" + ] + }, + "QueryCompilationResultActions": { + "methods": [ + "queryCompilationResultActions", + "queryCompilationResultActionsStream", + "queryCompilationResultActionsAsync" + ] + }, + "ListWorkflowInvocations": { + "methods": [ + "listWorkflowInvocations", + "listWorkflowInvocationsStream", + "listWorkflowInvocationsAsync" + ] + }, + "QueryWorkflowInvocationActions": { + "methods": [ + "queryWorkflowInvocationActions", + "queryWorkflowInvocationActionsStream", + "queryWorkflowInvocationActionsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-dataform/src/v1beta1/index.ts b/packages/google-cloud-dataform/src/v1beta1/index.ts new file mode 100644 index 00000000000..20185442e0c --- /dev/null +++ b/packages/google-cloud-dataform/src/v1beta1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {DataformClient} from './dataform_client'; diff --git a/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.js b/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..b3cf17bc956 --- /dev/null +++ b/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const dataform = require('@google-cloud/dataform'); + +function main() { + const dataformClient = new dataform.DataformClient(); +} + +main(); diff --git a/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..fbfd42e46a2 --- /dev/null +++ b/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {DataformClient} from '@google-cloud/dataform'; + +// check that the client class type name can be used +function doStuffWithDataformClient(client: DataformClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const dataformClient = new DataformClient(); + doStuffWithDataformClient(dataformClient); +} + +main(); diff --git a/packages/google-cloud-dataform/system-test/install.ts b/packages/google-cloud-dataform/system-test/install.ts new file mode 100644 index 00000000000..f61fe236476 --- /dev/null +++ b/packages/google-cloud-dataform/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts new file mode 100644 index 00000000000..a17f029af33 --- /dev/null +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts @@ -0,0 +1,7406 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as dataformModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, IamProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1alpha2.DataformClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = dataformModule.v1alpha2.DataformClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = dataformModule.v1alpha2.DataformClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = dataformModule.v1alpha2.DataformClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new dataformModule.v1alpha2.DataformClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new dataformModule.v1alpha2.DataformClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + await client.initialize(); + assert(client.dataformStub); + }); + + it('has close method for the initialized client', done => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dataformStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getRepository', () => { + it('invokes getRepository without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ); + client.innerApiCalls.getRepository = stubSimpleCall(expectedResponse); + const [response] = await client.getRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ); + client.innerApiCalls.getRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getRepository(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getRepository(request), expectedError); + }); + }); + + describe('createRepository', () => { + it('invokes createRepository without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateRepositoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ); + client.innerApiCalls.createRepository = stubSimpleCall(expectedResponse); + const [response] = await client.createRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateRepositoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ); + client.innerApiCalls.createRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateRepositoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createRepository(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateRepositoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createRepository(request), expectedError); + }); + }); + + describe('updateRepository', () => { + it('invokes updateRepository without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest', + ['repository', 'name'] + ); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ); + client.innerApiCalls.updateRepository = stubSimpleCall(expectedResponse); + const [response] = await client.updateRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRepository without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest', + ['repository', 'name'] + ); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ); + client.innerApiCalls.updateRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRepository with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest', + ['repository', 'name'] + ); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateRepository(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRepository with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest', + ['repository', 'name'] + ); + request.repository.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateRepository(request), expectedError); + }); + }); + + describe('deleteRepository', () => { + it('invokes deleteRepository without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteRepository = stubSimpleCall(expectedResponse); + const [response] = await client.deleteRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteRepository( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteRepository(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteRepository(request), expectedError); + }); + }); + + describe('fetchRemoteBranches', () => { + it('invokes fetchRemoteBranches without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse() + ); + client.innerApiCalls.fetchRemoteBranches = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchRemoteBranches(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchRemoteBranches without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse() + ); + client.innerApiCalls.fetchRemoteBranches = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchRemoteBranches( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchRemoteBranches with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchRemoteBranches = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchRemoteBranches(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchRemoteBranches with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchRemoteBranches(request), expectedError); + }); + }); + + describe('getWorkspace', () => { + it('invokes getWorkspace without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ); + client.innerApiCalls.getWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.getWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getWorkspace without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ); + client.innerApiCalls.getWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IWorkspace | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getWorkspace with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getWorkspace(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getWorkspace with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getWorkspace(request), expectedError); + }); + }); + + describe('createWorkspace', () => { + it('invokes createWorkspace without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ); + client.innerApiCalls.createWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.createWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createWorkspace without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ); + client.innerApiCalls.createWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IWorkspace | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createWorkspace with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createWorkspace(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createWorkspace with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createWorkspace(request), expectedError); + }); + }); + + describe('deleteWorkspace', () => { + it('invokes deleteWorkspace without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.deleteWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteWorkspace without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteWorkspace with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteWorkspace(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteWorkspace with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteWorkspace(request), expectedError); + }); + }); + + describe('installNpmPackages', () => { + it('invokes installNpmPackages without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse() + ); + client.innerApiCalls.installNpmPackages = + stubSimpleCall(expectedResponse); + const [response] = await client.installNpmPackages(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes installNpmPackages without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse() + ); + client.innerApiCalls.installNpmPackages = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.installNpmPackages( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes installNpmPackages with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.installNpmPackages = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.installNpmPackages(request), expectedError); + const actualRequest = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes installNpmPackages with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.installNpmPackages(request), expectedError); + }); + }); + + describe('pullGitCommits', () => { + it('invokes pullGitCommits without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PullGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pullGitCommits = stubSimpleCall(expectedResponse); + const [response] = await client.pullGitCommits(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pullGitCommits without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PullGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pullGitCommits = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pullGitCommits( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pullGitCommits with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PullGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.pullGitCommits = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pullGitCommits(request), expectedError); + const actualRequest = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pullGitCommits with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PullGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pullGitCommits(request), expectedError); + }); + }); + + describe('pushGitCommits', () => { + it('invokes pushGitCommits without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PushGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pushGitCommits = stubSimpleCall(expectedResponse); + const [response] = await client.pushGitCommits(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pushGitCommits without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PushGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pushGitCommits = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pushGitCommits( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pushGitCommits with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PushGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.pushGitCommits = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pushGitCommits(request), expectedError); + const actualRequest = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pushGitCommits with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PushGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pushGitCommits(request), expectedError); + }); + }); + + describe('fetchFileGitStatuses', () => { + it('invokes fetchFileGitStatuses without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse() + ); + client.innerApiCalls.fetchFileGitStatuses = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchFileGitStatuses(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFileGitStatuses without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse() + ); + client.innerApiCalls.fetchFileGitStatuses = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchFileGitStatuses( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFileGitStatuses with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchFileGitStatuses = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchFileGitStatuses(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFileGitStatuses with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchFileGitStatuses(request), expectedError); + }); + }); + + describe('fetchGitAheadBehind', () => { + it('invokes fetchGitAheadBehind without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse() + ); + client.innerApiCalls.fetchGitAheadBehind = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchGitAheadBehind(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchGitAheadBehind without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse() + ); + client.innerApiCalls.fetchGitAheadBehind = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchGitAheadBehind( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchGitAheadBehind with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchGitAheadBehind = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchGitAheadBehind(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchGitAheadBehind with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchGitAheadBehind(request), expectedError); + }); + }); + + describe('commitWorkspaceChanges', () => { + it('invokes commitWorkspaceChanges without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.commitWorkspaceChanges = + stubSimpleCall(expectedResponse); + const [response] = await client.commitWorkspaceChanges(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes commitWorkspaceChanges without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.commitWorkspaceChanges = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.commitWorkspaceChanges( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes commitWorkspaceChanges with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.commitWorkspaceChanges = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.commitWorkspaceChanges(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes commitWorkspaceChanges with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.commitWorkspaceChanges(request), + expectedError + ); + }); + }); + + describe('resetWorkspaceChanges', () => { + it('invokes resetWorkspaceChanges without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.resetWorkspaceChanges = + stubSimpleCall(expectedResponse); + const [response] = await client.resetWorkspaceChanges(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resetWorkspaceChanges without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.resetWorkspaceChanges = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.resetWorkspaceChanges( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resetWorkspaceChanges with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.resetWorkspaceChanges = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.resetWorkspaceChanges(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resetWorkspaceChanges with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.resetWorkspaceChanges(request), + expectedError + ); + }); + }); + + describe('fetchFileDiff', () => { + it('invokes fetchFileDiff without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileDiffRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileDiffResponse() + ); + client.innerApiCalls.fetchFileDiff = stubSimpleCall(expectedResponse); + const [response] = await client.fetchFileDiff(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFileDiff without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileDiffRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileDiffResponse() + ); + client.innerApiCalls.fetchFileDiff = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchFileDiff( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFileDiff with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileDiffRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchFileDiff = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchFileDiff(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFileDiff with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileDiffRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchFileDiff(request), expectedError); + }); + }); + + describe('makeDirectory', () => { + it('invokes makeDirectory without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MakeDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MakeDirectoryResponse() + ); + client.innerApiCalls.makeDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.makeDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes makeDirectory without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MakeDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MakeDirectoryResponse() + ); + client.innerApiCalls.makeDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.makeDirectory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes makeDirectory with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MakeDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.makeDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.makeDirectory(request), expectedError); + const actualRequest = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes makeDirectory with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MakeDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.makeDirectory(request), expectedError); + }); + }); + + describe('removeDirectory', () => { + it('invokes removeDirectory without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.removeDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDirectory without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeDirectory( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDirectory with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.removeDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.removeDirectory(request), expectedError); + const actualRequest = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDirectory with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.removeDirectory(request), expectedError); + }); + }); + + describe('moveDirectory', () => { + it('invokes moveDirectory without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveDirectoryResponse() + ); + client.innerApiCalls.moveDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.moveDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes moveDirectory without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveDirectoryResponse() + ); + client.innerApiCalls.moveDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.moveDirectory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes moveDirectory with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.moveDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.moveDirectory(request), expectedError); + const actualRequest = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes moveDirectory with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.moveDirectory(request), expectedError); + }); + }); + + describe('readFile', () => { + it('invokes readFile without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ReadFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileResponse() + ); + client.innerApiCalls.readFile = stubSimpleCall(expectedResponse); + const [response] = await client.readFile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readFile without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ReadFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileResponse() + ); + client.innerApiCalls.readFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.readFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IReadFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readFile with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ReadFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.readFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.readFile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readFile with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ReadFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.readFile(request), expectedError); + }); + }); + + describe('removeFile', () => { + it('invokes removeFile without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeFile = stubSimpleCall(expectedResponse); + const [response] = await client.removeFile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeFile without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeFile( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeFile with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.removeFile = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.removeFile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeFile with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.removeFile(request), expectedError); + }); + }); + + describe('moveFile', () => { + it('invokes moveFile without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveFileResponse() + ); + client.innerApiCalls.moveFile = stubSimpleCall(expectedResponse); + const [response] = await client.moveFile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes moveFile without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveFileResponse() + ); + client.innerApiCalls.moveFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.moveFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IMoveFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes moveFile with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.moveFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.moveFile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes moveFile with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.moveFile(request), expectedError); + }); + }); + + describe('writeFile', () => { + it('invokes writeFile without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.WriteFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WriteFileResponse() + ); + client.innerApiCalls.writeFile = stubSimpleCall(expectedResponse); + const [response] = await client.writeFile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes writeFile without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.WriteFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WriteFileResponse() + ); + client.innerApiCalls.writeFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.writeFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IWriteFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes writeFile with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.WriteFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.writeFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.writeFile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes writeFile with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.WriteFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.writeFile(request), expectedError); + }); + }); + + describe('getCompilationResult', () => { + it('invokes getCompilationResult without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetCompilationResultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ); + client.innerApiCalls.getCompilationResult = + stubSimpleCall(expectedResponse); + const [response] = await client.getCompilationResult(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCompilationResult without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetCompilationResultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ); + client.innerApiCalls.getCompilationResult = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCompilationResult( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.ICompilationResult | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCompilationResult with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetCompilationResultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCompilationResult = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCompilationResult(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCompilationResult with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetCompilationResultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCompilationResult(request), expectedError); + }); + }); + + describe('createCompilationResult', () => { + it('invokes createCompilationResult without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ); + client.innerApiCalls.createCompilationResult = + stubSimpleCall(expectedResponse); + const [response] = await client.createCompilationResult(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCompilationResult without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ); + client.innerApiCalls.createCompilationResult = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCompilationResult( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.ICompilationResult | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCompilationResult with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCompilationResult = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createCompilationResult(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCompilationResult with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createCompilationResult(request), + expectedError + ); + }); + }); + + describe('getWorkflowInvocation', () => { + it('invokes getWorkflowInvocation without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ); + client.innerApiCalls.getWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.getWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ); + client.innerApiCalls.getWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getWorkflowInvocation with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getWorkflowInvocation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('createWorkflowInvocation', () => { + it('invokes createWorkflowInvocation without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ); + client.innerApiCalls.createWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.createWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ); + client.innerApiCalls.createWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createWorkflowInvocation with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createWorkflowInvocation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('deleteWorkflowInvocation', () => { + it('invokes deleteWorkflowInvocation without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteWorkflowInvocation with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteWorkflowInvocation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('cancelWorkflowInvocation', () => { + it('invokes cancelWorkflowInvocation without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.cancelWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelWorkflowInvocation with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.cancelWorkflowInvocation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.cancelWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('listRepositories', () => { + it('invokes listRepositories without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + ]; + client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); + const [response] = await client.listRepositories(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositories without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + ]; + client.innerApiCalls.listRepositories = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRepositories( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IRepository[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositories with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listRepositories = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listRepositories(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositoriesStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + ]; + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.Repository[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1alpha2.Repository) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listRepositoriesStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.Repository[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1alpha2.Repository) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRepositories without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + ]; + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.IRepository[] = []; + const iterable = client.listRepositoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRepositories with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRepositoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.IRepository[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listWorkspaces', () => { + it('invokes listWorkspaces without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + ]; + client.innerApiCalls.listWorkspaces = stubSimpleCall(expectedResponse); + const [response] = await client.listWorkspaces(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkspaces without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + ]; + client.innerApiCalls.listWorkspaces = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkspaces( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IWorkspace[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkspaces with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkspaces = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listWorkspaces(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkspacesStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + ]; + client.descriptors.page.listWorkspaces.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listWorkspacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.Workspace[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1alpha2.Workspace) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkspaces, request) + ); + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listWorkspacesStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkspaces.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkspacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.Workspace[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1alpha2.Workspace) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkspaces, request) + ); + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkspaces without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + ]; + client.descriptors.page.listWorkspaces.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.IWorkspace[] = []; + const iterable = client.listWorkspacesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listWorkspaces.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkspaces with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkspaces.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkspacesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.IWorkspace[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listWorkspaces.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('queryDirectoryContents', () => { + it('invokes queryDirectoryContents without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.innerApiCalls.queryDirectoryContents = + stubSimpleCall(expectedResponse); + const [response] = await client.queryDirectoryContents(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryDirectoryContents without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.innerApiCalls.queryDirectoryContents = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryDirectoryContents( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryDirectoryContents with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryDirectoryContents = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryDirectoryContents(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryDirectoryContentsStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.descriptors.page.queryDirectoryContents.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryDirectoryContentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.queryDirectoryContents, request) + ); + assert( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes queryDirectoryContentsStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.queryDirectoryContents.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryDirectoryContentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.queryDirectoryContents, request) + ); + assert( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with queryDirectoryContents without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.descriptors.page.queryDirectoryContents.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[] = + []; + const iterable = client.queryDirectoryContentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with queryDirectoryContents with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.queryDirectoryContents.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryDirectoryContentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listCompilationResults', () => { + it('invokes listCompilationResults without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + ]; + client.innerApiCalls.listCompilationResults = + stubSimpleCall(expectedResponse); + const [response] = await client.listCompilationResults(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCompilationResults without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + ]; + client.innerApiCalls.listCompilationResults = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCompilationResults( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1alpha2.ICompilationResult[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCompilationResults with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCompilationResults = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listCompilationResults(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCompilationResultsStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + ]; + client.descriptors.page.listCompilationResults.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listCompilationResultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.CompilationResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.CompilationResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listCompilationResults, request) + ); + assert( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCompilationResultsStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCompilationResults.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listCompilationResultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.CompilationResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.CompilationResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listCompilationResults, request) + ); + assert( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCompilationResults without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + ]; + client.descriptors.page.listCompilationResults.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.ICompilationResult[] = + []; + const iterable = client.listCompilationResultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCompilationResults with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCompilationResults.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCompilationResultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.ICompilationResult[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('queryCompilationResultActions', () => { + it('invokes queryCompilationResultActions without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + ]; + client.innerApiCalls.queryCompilationResultActions = + stubSimpleCall(expectedResponse); + const [response] = await client.queryCompilationResultActions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryCompilationResultActions without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + ]; + client.innerApiCalls.queryCompilationResultActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryCompilationResultActions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1alpha2.ICompilationResultAction[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryCompilationResultActions with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryCompilationResultActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryCompilationResultActions(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryCompilationResultActionsStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + ]; + client.descriptors.page.queryCompilationResultActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryCompilationResultActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.CompilationResultAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.CompilationResultAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryCompilationResultActions, + request + ) + ); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes queryCompilationResultActionsStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.queryCompilationResultActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryCompilationResultActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.CompilationResultAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.CompilationResultAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryCompilationResultActions, + request + ) + ); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with queryCompilationResultActions without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + ]; + client.descriptors.page.queryCompilationResultActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.ICompilationResultAction[] = + []; + const iterable = client.queryCompilationResultActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with queryCompilationResultActions with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.queryCompilationResultActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryCompilationResultActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.ICompilationResultAction[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listWorkflowInvocations', () => { + it('invokes listWorkflowInvocations without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + ]; + client.innerApiCalls.listWorkflowInvocations = + stubSimpleCall(expectedResponse); + const [response] = await client.listWorkflowInvocations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkflowInvocations without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + ]; + client.innerApiCalls.listWorkflowInvocations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkflowInvocations( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkflowInvocations with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkflowInvocations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listWorkflowInvocations(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkflowInvocationsStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + ]; + client.descriptors.page.listWorkflowInvocations.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listWorkflowInvocationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.WorkflowInvocation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.WorkflowInvocation + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflowInvocations, request) + ); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listWorkflowInvocationsStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflowInvocations.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkflowInvocationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.WorkflowInvocation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.WorkflowInvocation + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflowInvocations, request) + ); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkflowInvocations without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + ]; + client.descriptors.page.listWorkflowInvocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation[] = + []; + const iterable = client.listWorkflowInvocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkflowInvocations with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflowInvocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkflowInvocationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('queryWorkflowInvocationActions', () => { + it('invokes queryWorkflowInvocationActions without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + ]; + client.innerApiCalls.queryWorkflowInvocationActions = + stubSimpleCall(expectedResponse); + const [response] = await client.queryWorkflowInvocationActions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryWorkflowInvocationActions without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + ]; + client.innerApiCalls.queryWorkflowInvocationActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryWorkflowInvocationActions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryWorkflowInvocationActions with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryWorkflowInvocationActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryWorkflowInvocationActions(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryWorkflowInvocationActionsStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + ]; + client.descriptors.page.queryWorkflowInvocationActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryWorkflowInvocationActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryWorkflowInvocationActions, + request + ) + ); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes queryWorkflowInvocationActionsStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.queryWorkflowInvocationActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryWorkflowInvocationActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryWorkflowInvocationActions, + request + ) + ); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with queryWorkflowInvocationActions without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + ]; + client.descriptors.page.queryWorkflowInvocationActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[] = + []; + const iterable = client.queryWorkflowInvocationActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with queryWorkflowInvocationActions with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.queryWorkflowInvocationActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryWorkflowInvocationActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('compilationResult', () => { + const fakePath = '/rendered/path/compilationResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + compilation_result: 'compilationResultValue', + }; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.compilationResultPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.compilationResultPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('compilationResultPath', () => { + const result = client.compilationResultPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'compilationResultValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCompilationResultName', () => { + const result = client.matchProjectFromCompilationResultName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCompilationResultName', () => { + const result = client.matchLocationFromCompilationResultName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromCompilationResultName', () => { + const result = + client.matchRepositoryFromCompilationResultName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCompilationResultFromCompilationResultName', () => { + const result = + client.matchCompilationResultFromCompilationResultName(fakePath); + assert.strictEqual(result, 'compilationResultValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('repository', () => { + const fakePath = '/rendered/path/repository'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + }; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.repositoryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.repositoryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('repositoryPath', () => { + const result = client.repositoryPath( + 'projectValue', + 'locationValue', + 'repositoryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.repositoryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromRepositoryName', () => { + const result = client.matchProjectFromRepositoryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromRepositoryName', () => { + const result = client.matchLocationFromRepositoryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromRepositoryName', () => { + const result = client.matchRepositoryFromRepositoryName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('workflowInvocation', () => { + const fakePath = '/rendered/path/workflowInvocation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + workflow_invocation: 'workflowInvocationValue', + }; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workflowInvocationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workflowInvocationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workflowInvocationPath', () => { + const result = client.workflowInvocationPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'workflowInvocationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkflowInvocationName', () => { + const result = client.matchProjectFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkflowInvocationName', () => { + const result = client.matchLocationFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromWorkflowInvocationName', () => { + const result = + client.matchRepositoryFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkflowInvocationFromWorkflowInvocationName', () => { + const result = + client.matchWorkflowInvocationFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'workflowInvocationValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('workspace', () => { + const fakePath = '/rendered/path/workspace'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + workspace: 'workspaceValue', + }; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workspacePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workspacePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workspacePath', () => { + const result = client.workspacePath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'workspaceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.workspacePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkspaceName', () => { + const result = client.matchProjectFromWorkspaceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkspaceName', () => { + const result = client.matchLocationFromWorkspaceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromWorkspaceName', () => { + const result = client.matchRepositoryFromWorkspaceName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkspaceFromWorkspaceName', () => { + const result = client.matchWorkspaceFromWorkspaceName(fakePath); + assert.strictEqual(result, 'workspaceValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts new file mode 100644 index 00000000000..03a4187b590 --- /dev/null +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts @@ -0,0 +1,7403 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as dataformModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, IamProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta1.DataformClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = dataformModule.v1beta1.DataformClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = dataformModule.v1beta1.DataformClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = dataformModule.v1beta1.DataformClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new dataformModule.v1beta1.DataformClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new dataformModule.v1beta1.DataformClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + await client.initialize(); + assert(client.dataformStub); + }); + + it('has close method for the initialized client', done => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dataformStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getRepository', () => { + it('invokes getRepository without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.getRepository = stubSimpleCall(expectedResponse); + const [response] = await client.getRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.getRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getRepository(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getRepository(request), expectedError); + }); + }); + + describe('createRepository', () => { + it('invokes createRepository without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateRepositoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.createRepository = stubSimpleCall(expectedResponse); + const [response] = await client.createRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateRepositoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.createRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateRepositoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createRepository(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateRepositoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createRepository(request), expectedError); + }); + }); + + describe('updateRepository', () => { + it('invokes updateRepository without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.UpdateRepositoryRequest', + ['repository', 'name'] + ); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.updateRepository = stubSimpleCall(expectedResponse); + const [response] = await client.updateRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRepository without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.UpdateRepositoryRequest', + ['repository', 'name'] + ); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.updateRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRepository with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.UpdateRepositoryRequest', + ['repository', 'name'] + ); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateRepository(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRepository with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.UpdateRepositoryRequest', + ['repository', 'name'] + ); + request.repository.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateRepository(request), expectedError); + }); + }); + + describe('deleteRepository', () => { + it('invokes deleteRepository without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteRepository = stubSimpleCall(expectedResponse); + const [response] = await client.deleteRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteRepository( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteRepository(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteRepository(request), expectedError); + }); + }); + + describe('fetchRemoteBranches', () => { + it('invokes fetchRemoteBranches without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse() + ); + client.innerApiCalls.fetchRemoteBranches = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchRemoteBranches(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchRemoteBranches without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse() + ); + client.innerApiCalls.fetchRemoteBranches = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchRemoteBranches( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchRemoteBranches with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchRemoteBranches = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchRemoteBranches(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchRemoteBranches with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchRemoteBranches(request), expectedError); + }); + }); + + describe('getWorkspace', () => { + it('invokes getWorkspace without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ); + client.innerApiCalls.getWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.getWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getWorkspace without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ); + client.innerApiCalls.getWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkspace | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getWorkspace with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getWorkspace(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getWorkspace with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getWorkspace(request), expectedError); + }); + }); + + describe('createWorkspace', () => { + it('invokes createWorkspace without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateWorkspaceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ); + client.innerApiCalls.createWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.createWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createWorkspace without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateWorkspaceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ); + client.innerApiCalls.createWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkspace | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createWorkspace with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateWorkspaceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createWorkspace(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createWorkspace with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateWorkspaceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createWorkspace(request), expectedError); + }); + }); + + describe('deleteWorkspace', () => { + it('invokes deleteWorkspace without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.deleteWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteWorkspace without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteWorkspace with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteWorkspace(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteWorkspace with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteWorkspace(request), expectedError); + }); + }); + + describe('installNpmPackages', () => { + it('invokes installNpmPackages without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse() + ); + client.innerApiCalls.installNpmPackages = + stubSimpleCall(expectedResponse); + const [response] = await client.installNpmPackages(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes installNpmPackages without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse() + ); + client.innerApiCalls.installNpmPackages = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.installNpmPackages( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes installNpmPackages with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.installNpmPackages = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.installNpmPackages(request), expectedError); + const actualRequest = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes installNpmPackages with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.installNpmPackages(request), expectedError); + }); + }); + + describe('pullGitCommits', () => { + it('invokes pullGitCommits without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PullGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pullGitCommits = stubSimpleCall(expectedResponse); + const [response] = await client.pullGitCommits(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pullGitCommits without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PullGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pullGitCommits = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pullGitCommits( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pullGitCommits with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PullGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.pullGitCommits = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pullGitCommits(request), expectedError); + const actualRequest = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pullGitCommits with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PullGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pullGitCommits(request), expectedError); + }); + }); + + describe('pushGitCommits', () => { + it('invokes pushGitCommits without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PushGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pushGitCommits = stubSimpleCall(expectedResponse); + const [response] = await client.pushGitCommits(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pushGitCommits without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PushGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pushGitCommits = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pushGitCommits( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pushGitCommits with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PushGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.pushGitCommits = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pushGitCommits(request), expectedError); + const actualRequest = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pushGitCommits with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PushGitCommitsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pushGitCommits(request), expectedError); + }); + }); + + describe('fetchFileGitStatuses', () => { + it('invokes fetchFileGitStatuses without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse() + ); + client.innerApiCalls.fetchFileGitStatuses = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchFileGitStatuses(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFileGitStatuses without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse() + ); + client.innerApiCalls.fetchFileGitStatuses = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchFileGitStatuses( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFileGitStatuses with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchFileGitStatuses = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchFileGitStatuses(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFileGitStatuses with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchFileGitStatuses(request), expectedError); + }); + }); + + describe('fetchGitAheadBehind', () => { + it('invokes fetchGitAheadBehind without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse() + ); + client.innerApiCalls.fetchGitAheadBehind = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchGitAheadBehind(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchGitAheadBehind without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse() + ); + client.innerApiCalls.fetchGitAheadBehind = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchGitAheadBehind( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchGitAheadBehind with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchGitAheadBehind = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchGitAheadBehind(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchGitAheadBehind with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchGitAheadBehind(request), expectedError); + }); + }); + + describe('commitWorkspaceChanges', () => { + it('invokes commitWorkspaceChanges without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.commitWorkspaceChanges = + stubSimpleCall(expectedResponse); + const [response] = await client.commitWorkspaceChanges(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes commitWorkspaceChanges without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.commitWorkspaceChanges = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.commitWorkspaceChanges( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes commitWorkspaceChanges with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.commitWorkspaceChanges = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.commitWorkspaceChanges(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes commitWorkspaceChanges with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.commitWorkspaceChanges(request), + expectedError + ); + }); + }); + + describe('resetWorkspaceChanges', () => { + it('invokes resetWorkspaceChanges without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.resetWorkspaceChanges = + stubSimpleCall(expectedResponse); + const [response] = await client.resetWorkspaceChanges(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resetWorkspaceChanges without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.resetWorkspaceChanges = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.resetWorkspaceChanges( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resetWorkspaceChanges with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.resetWorkspaceChanges = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.resetWorkspaceChanges(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resetWorkspaceChanges with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.resetWorkspaceChanges(request), + expectedError + ); + }); + }); + + describe('fetchFileDiff', () => { + it('invokes fetchFileDiff without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileDiffRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffResponse() + ); + client.innerApiCalls.fetchFileDiff = stubSimpleCall(expectedResponse); + const [response] = await client.fetchFileDiff(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFileDiff without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileDiffRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffResponse() + ); + client.innerApiCalls.fetchFileDiff = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchFileDiff( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFileDiff with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileDiffRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchFileDiff = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchFileDiff(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFileDiff with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileDiffRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchFileDiff(request), expectedError); + }); + }); + + describe('makeDirectory', () => { + it('invokes makeDirectory without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MakeDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryResponse() + ); + client.innerApiCalls.makeDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.makeDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes makeDirectory without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MakeDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryResponse() + ); + client.innerApiCalls.makeDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.makeDirectory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes makeDirectory with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MakeDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.makeDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.makeDirectory(request), expectedError); + const actualRequest = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes makeDirectory with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MakeDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.makeDirectory(request), expectedError); + }); + }); + + describe('removeDirectory', () => { + it('invokes removeDirectory without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.removeDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDirectory without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeDirectory( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDirectory with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.removeDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.removeDirectory(request), expectedError); + const actualRequest = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDirectory with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.removeDirectory(request), expectedError); + }); + }); + + describe('moveDirectory', () => { + it('invokes moveDirectory without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryResponse() + ); + client.innerApiCalls.moveDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.moveDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes moveDirectory without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryResponse() + ); + client.innerApiCalls.moveDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.moveDirectory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes moveDirectory with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.moveDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.moveDirectory(request), expectedError); + const actualRequest = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes moveDirectory with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveDirectoryRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.moveDirectory(request), expectedError); + }); + }); + + describe('readFile', () => { + it('invokes readFile without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ReadFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileResponse() + ); + client.innerApiCalls.readFile = stubSimpleCall(expectedResponse); + const [response] = await client.readFile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readFile without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ReadFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileResponse() + ); + client.innerApiCalls.readFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.readFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IReadFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readFile with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ReadFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.readFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.readFile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readFile with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ReadFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.readFile(request), expectedError); + }); + }); + + describe('removeFile', () => { + it('invokes removeFile without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeFile = stubSimpleCall(expectedResponse); + const [response] = await client.removeFile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeFile without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeFile( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeFile with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.removeFile = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.removeFile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeFile with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.removeFile(request), expectedError); + }); + }); + + describe('moveFile', () => { + it('invokes moveFile without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileResponse() + ); + client.innerApiCalls.moveFile = stubSimpleCall(expectedResponse); + const [response] = await client.moveFile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes moveFile without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileResponse() + ); + client.innerApiCalls.moveFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.moveFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IMoveFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes moveFile with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.moveFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.moveFile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes moveFile with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.moveFile(request), expectedError); + }); + }); + + describe('writeFile', () => { + it('invokes writeFile without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.WriteFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileResponse() + ); + client.innerApiCalls.writeFile = stubSimpleCall(expectedResponse); + const [response] = await client.writeFile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes writeFile without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.WriteFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileResponse() + ); + client.innerApiCalls.writeFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.writeFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWriteFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes writeFile with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.WriteFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.writeFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.writeFile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes writeFile with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.WriteFileRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.writeFile(request), expectedError); + }); + }); + + describe('getCompilationResult', () => { + it('invokes getCompilationResult without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetCompilationResultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ); + client.innerApiCalls.getCompilationResult = + stubSimpleCall(expectedResponse); + const [response] = await client.getCompilationResult(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCompilationResult without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetCompilationResultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ); + client.innerApiCalls.getCompilationResult = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCompilationResult( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.ICompilationResult | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCompilationResult with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetCompilationResultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCompilationResult = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCompilationResult(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCompilationResult with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetCompilationResultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCompilationResult(request), expectedError); + }); + }); + + describe('createCompilationResult', () => { + it('invokes createCompilationResult without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ); + client.innerApiCalls.createCompilationResult = + stubSimpleCall(expectedResponse); + const [response] = await client.createCompilationResult(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCompilationResult without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ); + client.innerApiCalls.createCompilationResult = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCompilationResult( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.ICompilationResult | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCompilationResult with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCompilationResult = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createCompilationResult(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCompilationResult with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createCompilationResult(request), + expectedError + ); + }); + }); + + describe('getWorkflowInvocation', () => { + it('invokes getWorkflowInvocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ); + client.innerApiCalls.getWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.getWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ); + client.innerApiCalls.getWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkflowInvocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getWorkflowInvocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getWorkflowInvocation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('createWorkflowInvocation', () => { + it('invokes createWorkflowInvocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ); + client.innerApiCalls.createWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.createWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ); + client.innerApiCalls.createWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkflowInvocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createWorkflowInvocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createWorkflowInvocation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('deleteWorkflowInvocation', () => { + it('invokes deleteWorkflowInvocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteWorkflowInvocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteWorkflowInvocation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('cancelWorkflowInvocation', () => { + it('invokes cancelWorkflowInvocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.cancelWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelWorkflowInvocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.cancelWorkflowInvocation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.cancelWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('listRepositories', () => { + it('invokes listRepositories without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + ]; + client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); + const [response] = await client.listRepositories(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositories without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + ]; + client.innerApiCalls.listRepositories = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRepositories( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IRepository[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositories with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listRepositories = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listRepositories(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositoriesStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + ]; + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.Repository[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1beta1.Repository) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listRepositoriesStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.Repository[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1beta1.Repository) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRepositories without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + ]; + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.IRepository[] = []; + const iterable = client.listRepositoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRepositories with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRepositoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.IRepository[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listWorkspaces', () => { + it('invokes listWorkspaces without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + ]; + client.innerApiCalls.listWorkspaces = stubSimpleCall(expectedResponse); + const [response] = await client.listWorkspaces(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkspaces without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + ]; + client.innerApiCalls.listWorkspaces = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkspaces( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkspace[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkspaces with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkspaces = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listWorkspaces(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkspacesStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + ]; + client.descriptors.page.listWorkspaces.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listWorkspacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.Workspace[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1beta1.Workspace) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkspaces, request) + ); + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listWorkspacesStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkspaces.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkspacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.Workspace[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1beta1.Workspace) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkspaces, request) + ); + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkspaces without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + ]; + client.descriptors.page.listWorkspaces.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.IWorkspace[] = []; + const iterable = client.listWorkspacesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listWorkspaces.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkspaces with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkspaces.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkspacesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.IWorkspace[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listWorkspaces.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('queryDirectoryContents', () => { + it('invokes queryDirectoryContents without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.innerApiCalls.queryDirectoryContents = + stubSimpleCall(expectedResponse); + const [response] = await client.queryDirectoryContents(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryDirectoryContents without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.innerApiCalls.queryDirectoryContents = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryDirectoryContents( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryDirectoryContents with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryDirectoryContents = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryDirectoryContents(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryDirectoryContentsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.descriptors.page.queryDirectoryContents.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryDirectoryContentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.queryDirectoryContents, request) + ); + assert( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes queryDirectoryContentsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.queryDirectoryContents.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryDirectoryContentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.queryDirectoryContents, request) + ); + assert( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with queryDirectoryContents without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.descriptors.page.queryDirectoryContents.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[] = + []; + const iterable = client.queryDirectoryContentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with queryDirectoryContents with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.queryDirectoryContents.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryDirectoryContentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listCompilationResults', () => { + it('invokes listCompilationResults without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + ]; + client.innerApiCalls.listCompilationResults = + stubSimpleCall(expectedResponse); + const [response] = await client.listCompilationResults(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCompilationResults without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + ]; + client.innerApiCalls.listCompilationResults = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCompilationResults( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.ICompilationResult[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCompilationResults with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCompilationResults = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listCompilationResults(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCompilationResultsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + ]; + client.descriptors.page.listCompilationResults.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listCompilationResultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.CompilationResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.CompilationResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listCompilationResults, request) + ); + assert( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCompilationResultsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCompilationResults.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listCompilationResultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.CompilationResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.CompilationResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listCompilationResults, request) + ); + assert( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCompilationResults without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + ]; + client.descriptors.page.listCompilationResults.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.ICompilationResult[] = + []; + const iterable = client.listCompilationResultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCompilationResults with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCompilationResults.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCompilationResultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.ICompilationResult[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('queryCompilationResultActions', () => { + it('invokes queryCompilationResultActions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + ]; + client.innerApiCalls.queryCompilationResultActions = + stubSimpleCall(expectedResponse); + const [response] = await client.queryCompilationResultActions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryCompilationResultActions without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + ]; + client.innerApiCalls.queryCompilationResultActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryCompilationResultActions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.ICompilationResultAction[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryCompilationResultActions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryCompilationResultActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryCompilationResultActions(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryCompilationResultActionsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + ]; + client.descriptors.page.queryCompilationResultActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryCompilationResultActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.CompilationResultAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.CompilationResultAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryCompilationResultActions, + request + ) + ); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes queryCompilationResultActionsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.queryCompilationResultActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryCompilationResultActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.CompilationResultAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.CompilationResultAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryCompilationResultActions, + request + ) + ); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with queryCompilationResultActions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + ]; + client.descriptors.page.queryCompilationResultActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.ICompilationResultAction[] = + []; + const iterable = client.queryCompilationResultActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with queryCompilationResultActions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.queryCompilationResultActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryCompilationResultActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.ICompilationResultAction[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listWorkflowInvocations', () => { + it('invokes listWorkflowInvocations without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + ]; + client.innerApiCalls.listWorkflowInvocations = + stubSimpleCall(expectedResponse); + const [response] = await client.listWorkflowInvocations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkflowInvocations without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + ]; + client.innerApiCalls.listWorkflowInvocations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkflowInvocations( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkflowInvocations with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkflowInvocations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listWorkflowInvocations(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkflowInvocationsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + ]; + client.descriptors.page.listWorkflowInvocations.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listWorkflowInvocationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.WorkflowInvocation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.WorkflowInvocation + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflowInvocations, request) + ); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listWorkflowInvocationsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflowInvocations.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkflowInvocationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.WorkflowInvocation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.WorkflowInvocation + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflowInvocations, request) + ); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkflowInvocations without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + ]; + client.descriptors.page.listWorkflowInvocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[] = + []; + const iterable = client.listWorkflowInvocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkflowInvocations with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflowInvocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkflowInvocationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('queryWorkflowInvocationActions', () => { + it('invokes queryWorkflowInvocationActions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + ]; + client.innerApiCalls.queryWorkflowInvocationActions = + stubSimpleCall(expectedResponse); + const [response] = await client.queryWorkflowInvocationActions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryWorkflowInvocationActions without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + ]; + client.innerApiCalls.queryWorkflowInvocationActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryWorkflowInvocationActions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryWorkflowInvocationActions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryWorkflowInvocationActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryWorkflowInvocationActions(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryWorkflowInvocationActionsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + ]; + client.descriptors.page.queryWorkflowInvocationActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryWorkflowInvocationActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryWorkflowInvocationActions, + request + ) + ); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes queryWorkflowInvocationActionsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.queryWorkflowInvocationActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryWorkflowInvocationActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryWorkflowInvocationActions, + request + ) + ); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with queryWorkflowInvocationActions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + ]; + client.descriptors.page.queryWorkflowInvocationActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[] = + []; + const iterable = client.queryWorkflowInvocationActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with queryWorkflowInvocationActions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.queryWorkflowInvocationActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryWorkflowInvocationActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('compilationResult', () => { + const fakePath = '/rendered/path/compilationResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + compilation_result: 'compilationResultValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.compilationResultPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.compilationResultPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('compilationResultPath', () => { + const result = client.compilationResultPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'compilationResultValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCompilationResultName', () => { + const result = client.matchProjectFromCompilationResultName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCompilationResultName', () => { + const result = client.matchLocationFromCompilationResultName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromCompilationResultName', () => { + const result = + client.matchRepositoryFromCompilationResultName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCompilationResultFromCompilationResultName', () => { + const result = + client.matchCompilationResultFromCompilationResultName(fakePath); + assert.strictEqual(result, 'compilationResultValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('repository', () => { + const fakePath = '/rendered/path/repository'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.repositoryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.repositoryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('repositoryPath', () => { + const result = client.repositoryPath( + 'projectValue', + 'locationValue', + 'repositoryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.repositoryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromRepositoryName', () => { + const result = client.matchProjectFromRepositoryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromRepositoryName', () => { + const result = client.matchLocationFromRepositoryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromRepositoryName', () => { + const result = client.matchRepositoryFromRepositoryName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('workflowInvocation', () => { + const fakePath = '/rendered/path/workflowInvocation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + workflow_invocation: 'workflowInvocationValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workflowInvocationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workflowInvocationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workflowInvocationPath', () => { + const result = client.workflowInvocationPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'workflowInvocationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkflowInvocationName', () => { + const result = client.matchProjectFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkflowInvocationName', () => { + const result = client.matchLocationFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromWorkflowInvocationName', () => { + const result = + client.matchRepositoryFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkflowInvocationFromWorkflowInvocationName', () => { + const result = + client.matchWorkflowInvocationFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'workflowInvocationValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('workspace', () => { + const fakePath = '/rendered/path/workspace'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + workspace: 'workspaceValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workspacePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workspacePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workspacePath', () => { + const result = client.workspacePath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'workspaceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.workspacePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkspaceName', () => { + const result = client.matchProjectFromWorkspaceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkspaceName', () => { + const result = client.matchLocationFromWorkspaceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromWorkspaceName', () => { + const result = client.matchRepositoryFromWorkspaceName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkspaceFromWorkspaceName', () => { + const result = client.matchWorkspaceFromWorkspaceName(fakePath); + assert.strictEqual(result, 'workspaceValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-dataform/tsconfig.json b/packages/google-cloud-dataform/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-dataform/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-dataform/webpack.config.js b/packages/google-cloud-dataform/webpack.config.js new file mode 100644 index 00000000000..0f07d5c10d2 --- /dev/null +++ b/packages/google-cloud-dataform/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'Dataform', + filename: './dataform.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; diff --git a/release-please-config.json b/release-please-config.json index 7accf5885fd..ed5cd7095a7 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -38,6 +38,8 @@ "packages/google-cloud-contactcenterinsights": {}, "packages/google-cloud-contentwarehouse": {}, "packages/google-cloud-datacatalog": {}, + "packages/google-cloud-datacatalog-lineage": {}, + "packages/google-cloud-dataform": {}, "packages/google-cloud-datafusion": {}, "packages/google-cloud-datalabeling": {}, "packages/google-cloud-dataplex": {}, @@ -60,6 +62,7 @@ "packages/google-cloud-gkeconnect-gateway": {}, "packages/google-cloud-gkehub": {}, "packages/google-cloud-gkemulticloud": {}, + "packages/google-cloud-gsuiteaddons": {}, "packages/google-cloud-iap": {}, "packages/google-cloud-ids": {}, "packages/google-cloud-iot": {}, @@ -123,15 +126,13 @@ "packages/google-iam-credentials": {}, "packages/google-identity-accesscontextmanager": {}, "packages/google-maps-addressvalidation": {}, + "packages/google-maps-mapsplatformdatasets": {}, "packages/google-maps-routing": {}, "packages/google-monitoring-dashboard": {}, "packages/google-privacy-dlp": {}, "packages/google-storagetransfer": {}, "packages/grafeas": {}, - "packages/typeless-sample-bot": {}, - "packages/google-maps-mapsplatformdatasets": {}, - "packages/google-cloud-datacatalog-lineage": {}, - "packages/google-cloud-gsuiteaddons": {} + "packages/typeless-sample-bot": {} }, "plugins": [ {